This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Meta tag description
expandshrink

Meta tag description

Meta tag description

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from