Forums / Developer / Meta Description tag / Comment40956
Rinze Cats
Wednesday 30 June 2004 3:13:52 am
I use the following code to display the metadata from the metadataarray, unless the current page has a specific description or keywords (which are simply attributes of my article class.
I am currently experiencing problems only with the description metadata field. I think this is a bug
{section name=meta loop=$site.meta} {switch match=$meta:key|wash} {case match=description} {section show=is_set($current_node.data_map.description)} {section show=ne($current_node.data_map.description.content, "")} <meta name="{$meta:key|wash}" content="{$current_node.data_map.description.content}"/> {section-else} <meta name="{$meta:key|wash}" content="{$meta:item|wash}"/> {/section} {section-else} <meta name="{$meta:key|wash}" content="{$meta:item|wash}"/> {/section} {/case} {case match=keywords} {section show=is_set($current_node.data_map.keywords)} {section show=ne($current_node.data_map.keywords.content, "")} <meta name="{$meta:key|wash}" content="{$current_node.data_map.keywords.content}"/> {section-else} <meta name="{$meta:key|wash}" content="{$meta:item|wash}"/> {/section} {section-else} <meta name="{$meta:key|wash}" content="{$meta:item|wash}"/> {/section} {/case} {case} <meta name="{$meta:key|wash}" content="{$meta:item|wash}"/> {/case} {/switch} {/section}