Frontpage node

Author Message

David Santiso

Saturday 16 April 2011 1:13:52 pm

Hi,

I've created other object of frontpage class. In 2zoneslayout1.tpl template I've written this code to display the node id:

{$node.node_id}

But it doesn't show nothing.

What is the problem?

Thanks,

David

Guillaume Kulakowski

Saturday 16 April 2011 4:11:45 pm

Hi,

Try with global variable:

{$#node.node_id}

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Manuel Koch

Sunday 17 April 2011 1:42:19 am

At first you should lock if $node has content with {$node|attribute(show)}

David Santiso

Sunday 17 April 2011 11:54:34 am

Yes, it works with global variable.

Thanks,

David

Marko Žmak

Sunday 17 April 2011 2:13:43 pm

"

Yes, it works with global variable.

Thanks,

David

"

From where and how do you include your 2zoneslayout1.tpl? Do you set a namespace for it when including it?

If you include it from the override template of the frontpage class and you don't specify a namespace, then also $node sohuld work.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 05:15:51
Script start
Timing: Jan 18 2025 05:15:51
Module start 'layout'
Timing: Jan 18 2025 05:15:51
Module start 'content'
Timing: Jan 18 2025 05:15:52
Module end 'content'
Timing: Jan 18 2025 05:15:52
Script end

Main resources:

Total runtime0.9362 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.7891152.6094
Module start 'layout' 0.00620.0036 740.398439.4141
Module start 'content' 0.00980.9247 779.8125639.5000
Module end 'content' 0.93460.0016 1,419.312512.2031
Script end 0.9362  1,431.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3520160.0002
Check MTime0.00150.1590160.0001
Mysql Total
Database connection0.00170.177710.0017
Mysqli_queries0.876093.5646670.0131
Looping result0.00060.0680650.0000
Template Total0.901596.320.4507
Template load0.00220.239420.0011
Template processing0.899296.046620.4496
Template load and register function0.00010.013010.0001
states
state_id_array0.00180.196010.0018
state_identifier_array0.00170.183420.0009
Override
Cache load0.00190.2055330.0001
Sytem overhead
Fetch class attribute can translate value0.00040.042540.0001
Fetch class attribute name0.00090.092470.0001
XML
Image XML parsing0.00150.158040.0004
class_abstraction
Instantiating content class attribute0.00000.001370.0000
General
dbfile0.00240.2549250.0001
String conversion0.00000.001140.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs