Forums / Setup & design / Meta tag description

Meta tag description

Author Message

laurent le cadet

Friday 01 September 2006 2:46:10 am

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

Marcin Drozd

Friday 01 September 2006 3:22:18 am

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}

http://ez-publish.pl

laurent le cadet

Friday 01 September 2006 5:41:21 am

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.

laurent le cadet

Friday 01 September 2006 6:31:22 am

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