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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:05:56
Script start
Timing: Jan 18 2025 19:05:56
Module start 'layout'
Timing: Jan 18 2025 19:05:56
Module start 'content'
Timing: Jan 18 2025 19:05:56
Module end 'content'
Timing: Jan 18 2025 19:05:56
Script end

Main resources:

Total runtime0.0246 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 587.9063152.6250
Module start 'layout' 0.00830.0041 740.531339.4453
Module start 'content' 0.01240.0101 779.976693.4297
Module end 'content' 0.02250.0021 873.406334.3047
Script end 0.0246  907.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002711.0372140.0002
Check MTime0.00124.8406140.0001
Mysql Total
Database connection0.00249.863310.0024
Mysqli_queries0.002811.269630.0009
Looping result0.00000.069710.0000
Template Total0.00166.510.0016
Template load0.00093.615510.0009
Template processing0.00072.884210.0007
Override
Cache load0.00062.433910.0006
General
dbfile0.004417.833280.0005
String conversion0.00000.020340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs