Friday 01 September 2006 11:46:10 am - 3 replies
Hi,
Meta tags are generated automatically with :
{section name=meta loop=$site.meta}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
{/section}
I want to preserve this loop but add the title's content of each page before the meta description's content :
<meta name="description" content="my page title - my description content based on site.ini" />
I think I have to digg $site.meta but I don't know where.
Any hint ?
Thanks.
Laurent
Friday 01 September 2006 12:22:18 pm
Hi
hmm, what do u think of:
{section name=meta loop=$site.meta}
{if $meta:key|eq( 'description' ) }
<meta name="description" content="my page title - my description content based on site.ini" />
{else}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
{/if}
{/section}
Modified on Friday 01 September 2006 12:22:48 pm by Marcin Drozd
Friday 01 September 2006 2:41:21 pm
hehe,
Fine !
Thanks.
I would like to perform now site title + meta description from site.ini :
<meta name="description" content="{$site_title} - {$Var from meta description} "/>
Another solution ?
Laurent.
Modified on Friday 01 September 2006 2:45:07 pm by laurent le cadet
Friday 01 September 2006 3:31:22 pm
Done.
{section name=meta loop=$site.meta}
{section show=$meta:key|eq( 'description' ) }
<meta name="description" content="{$site_title} - {$site.meta.description} " />
{section-else}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
{/section}
{/section}
Laurent
You must be logged in to post messages in this topic!