Friday 11 August 2006 8:54:21 am
Hi David, When i read your post again, i see that you have view-cache disabled, since $node is available in your pagelayout. This is a bug, because $node should actually not be available there. And it will not if you switch viewcache back on for better performance. The best option is to fetch the content based on the $module_result.node_id. When using the attribute_view_gui command it will show up as "content/datatype/view/ezkeyword.tpl" if you are showing a keyword datatype. To get it exactly the way you cant it, you can use the same code as in the datatype template, example:
<meta name="keywords" content="{$node.object.data_map.search_engine_keywords.content.keyword_string|wash}" />
This should not generate any pagebreaks. The version that works with view-caching will look something like this
{if $module_result.node_id}
{def $keyword_node=fetch(content,node,hash('node_id',$module_result.node_id)}
<meta name="keywords" content="{$keyword_node.object.data_map.search_engine_keywords.content.keyword_string|wash}" />
{else}
<meta name="keywords" content="Generic keywords" />
{/if}
Kristian
http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute
|