Forums / Developer / Frontpage node

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