How to find class_identifier in pagelayout while in edit

Author Message

Brendan Pike

Sunday 20 August 2006 6:15:28 pm

I want to include a javascript function in my body tag but only when editing a certain class type. I realise you shouldn't use $node in pagelayout but $module_result doesn't seem to present this information while in edit mode. Can someone educate me on the correct way please.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Sergey Shishkin

Sunday 20 August 2006 9:51:57 pm

Try to use <b>append-block</b> or <b>set-block</b> in edit-mode template for this class to add javascript.
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_functions/variables

Brendan Pike

Wednesday 23 August 2006 7:52:13 pm

Thanks Sergey, worked well :)

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

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 20:56:35
Script start
Timing: Jan 18 2025 20:56:35
Module start 'layout'
Timing: Jan 18 2025 20:56:35
Module start 'content'
Timing: Jan 18 2025 20:56:36
Module end 'content'
Timing: Jan 18 2025 20:56:36
Script end

Main resources:

Total runtime1.0810 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.1719152.6563
Module start 'layout' 0.00770.0041 740.828139.5078
Module start 'content' 0.01181.0676 780.3359493.1953
Module end 'content' 1.07940.0016 1,273.53138.2500
Script end 1.0810  1,281.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3170160.0002
Check MTime0.00150.1407160.0001
Mysql Total
Database connection0.00110.106410.0011
Mysqli_queries1.029395.2195570.0181
Looping result0.00060.0526550.0000
Template Total1.027095.020.5135
Template load0.00220.200320.0011
Template processing1.024894.800820.5124
Template load and register function0.00030.023310.0003
states
state_id_array0.00160.146310.0016
state_identifier_array0.00170.161920.0009
Override
Cache load0.00170.154890.0002
Sytem overhead
Fetch class attribute can translate value0.00060.053920.0003
Fetch class attribute name0.00150.141330.0005
XML
Image XML parsing0.00020.021220.0001
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00070.0632100.0001
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs