Friday 05 September 2008 5:15:18 am
Hello, I have small problem that is about to drive me mad. While trying to implement meta keywords in the html header I tried to fetch the keywords of the currently viewed node. As I need to do that in the page header I include it with a parameter that contains the current node id. pagelayout.tpl:
...
{include uri="design:page_head.tpl" current_node_id=$module_result.node_id}
...
(I was not sure about whether module_result is accessible in templates included from pagelayout.tpl so I supplied the parameter just to be sure). In page_head.tpl I can print the node id but fetching that node to get to the data map etc fails on most objects. page_head.tpl:
{def $node=fetch('content','node',hash('node_id',$current_node_id))}
it fails with articles, news and other content objects but works with folders for instance. It is even more disturbing as that same code works on another siteaccess (even without passing a parameter). Any hint on what's going on here is appreciated.
Thanks Oliver
|