you should <b>never</b> use the $node variable in pagelayout. It is an issue that has been <i>solved</i> in recent eZpublish releases by totally removing the $node variable thus making it no longer possible to do what you're trying. In previous versions, the $node was available on first-time access of a node that's why your piece of code works on your 3.7.2 eZpublish version.
So here, as I've suggested earlier, you'll need to fetch the $node before using it.
Hi Nabil,
thank you very very much for your respone, but I don't understand what do you mean with <i>"you'll need to fetch the $node before using it"</i>. Could you give me an example? Bye, Salvatore
The point/problem is that you're not always showing a node. Sometimes you show views from other modules, for example the login screen. In these cases having a $node variable is meaningless.
Therefor you should also check for the existence of $module_result.node_id before using it.
Read more on this friendly page: http://ez.no/doc/ez_publish/technical_manual/3_8/templates/the_pagelayout/variables_in_pagelayout
You must be logged in to post messages in this topic!