Error handling in templates

Author Message

Marc-Aurèle Brothier

Tuesday 05 December 2006 7:33:15 am

Hi,

I wish to know in my differents templates if the user is actually forwarded to a kernel error page, or like the login page/log-off. Those pages do not have a node ID.

I need to put some special tags in the header of the page when the user got forwarded on such a page. Is there any global variable that I can fetch to know if there is an error? And when which one (like the value in kernel/error/errors.php file).

The only "way" I found so far is with the $ui_component which returns either "error" or "user", but still I don't wich error (not found, need authentication...)

Betsy Gamrat

Saturday 23 December 2006 8:45:26 pm

Marc-Aurele,

I would use $uri_string.

If that doesn't work, try {$module_result|attribute(show)} at the end of your template. It will show you all the attributes in $module_result.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:35:12
Script start
Timing: Jan 18 2025 19:35:12
Module start 'layout'
Timing: Jan 18 2025 19:35:12
Module start 'content'
Timing: Jan 18 2025 19:35:13
Module end 'content'
Timing: Jan 18 2025 19:35:13
Script end

Main resources:

Total runtime0.8396 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.9141152.6250
Module start 'layout' 0.00550.0036 740.539139.4453
Module start 'content' 0.00920.8291 779.9844490.3672
Module end 'content' 0.83820.0013 1,270.35168.1641
Script end 0.8396  1,278.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4034160.0002
Check MTime0.00150.1803160.0001
Mysql Total
Database connection0.00070.081710.0007
Mysqli_queries0.797995.0319540.0148
Looping result0.00060.0667520.0000
Template Total0.806096.020.4030
Template load0.00200.238420.0010
Template processing0.804095.753720.4020
Template load and register function0.00020.022310.0002
states
state_id_array0.00110.134610.0011
state_identifier_array0.00110.126420.0005
Override
Cache load0.00160.1924120.0001
Sytem overhead
Fetch class attribute can translate value0.00060.069320.0003
Fetch class attribute name0.00140.168130.0005
XML
Image XML parsing0.00070.088520.0004
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00080.0964160.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs