$node not available in 3.2.3

Author Message

Tore Skobba

Tuesday 25 November 2003 1:57:18 am

Hi all

I have just upgraded my EZ installation to 3.2.3. However once I did this my design have become quite unstable.. Particulary the template variable "$node" seems to sometimes/often not be available at all (the error seems to not be consistent), leading to that menus etc. made based on that variable is not showing at all. Have anyone here experienced the same thing? Are there any solutions ?

PS: View caching is disabled.

Cheers
Tore

Bård Farstad

Tuesday 25 November 2003 2:32:27 am

The node variable is only available in the full/line.tpl files. You cannot rely on this variable in pagelayout.

The variable will not be available when you have cached pages.

You can fetch the node ID from {$module_result.node_id} in pagelayout if you need it.

Hope this helps,

--bård

Documentation: http://ez.no/doc

Tore Skobba

Tuesday 25 November 2003 9:03:16 am

Hi Bård

Thanks for help. I fixed it now.. But EZ might consider emphasising the various template variables in your documentation. I quickly learnt how to use the $node variable, and as such I did not bother reading more about the rest of the template variables. With aftersight that was not very clever, hopfully not all developers are as lazy as I am. But I do belive that others might do the same, particulary since $node is used in so many examples. Further confusing it is that it sometimes work with $node, and sometimes not (errors which does not seem to be consistent are often very though to find:).

Cheers
Tore

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