|
Ekkehard Dörre
|
Wednesday 23 June 2004 3:19:52 am
Comment40951
Hi Dries,
you can change page_head.tpl make a new class with title and 1 textfield (not xmltext) or take some text (not xml) from eg. the product class:
{*?template charset=latin1?*}
{default enable_help=true() enable_link=true()}
{let name=Path
path=$module_result.path
reverse_path=array()}
{section show=is_set($module_result.title_path)}
{set path=$module_result.title_path}
{/section}
{section loop=$:path}
{set reverse_path=$:reverse_path|array_prepend($:item)}
{/section}
{set-block scope=root variable=site_title}
{section loop=$Path:reverse_path}{$:item.text|wash}{delimiter} / {/delimiter}{/section} - {$site.title|wash}
{/set-block}
{/let}
{let titel_meta_list=fetch( content, list, hash( parent_node_id, $DesignKeys:used.node,
limit, 1,
sort_by, array( array( priority , false()) ),
class_filter_type, include,
class_filter_array, array( your_class eg. product ) ) )}
<title>{$site_title}{section name=Titel_Meta loop=$titel_meta_list} - {$Titel_Meta:item.name|wash}{/section}</title>
{/let}
{section show=and(is_set($#Header:extra_data),is_array($#Header:extra_data))}
{section name=ExtraData loop=$#Header:extra_data}
{$:item}
{/section}
{/section}
{* check if we need a http-equiv refresh *}
{section show=$site.redirect}
<meta http-equiv="Refresh" content="{$site.redirect.timer}; URL={$site.redirect.location}" />
{/section}
{section name=HTTP loop=$site.http_equiv}
<meta http-equiv="{$HTTP:key|wash}" content="{$HTTP:item|wash}" />
{/section}
{section name=meta loop=$site.meta}
{section show=eq("description",$meta:key)}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}{section name=Titel_Meta loop=fetch( content, list, hash( parent_node_id, $DesignKeys:used.node,
limit, 1,
sort_by, array( array( priority , false()) ),
class_filter_type, include,
class_filter_array, array( your_class eg. product ) ) )}, {attribute_view_gui attribute=$:item.object.data_map.description}{/section}" />
{section-else}
{section show=eq("keywords",$meta:key)}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}{section name=Titel_Meta loop=fetch( content, list, hash( parent_node_id, $DesignKeys:used.node,
limit, 1,
sort_by, array( array( priority , false()) ),
class_filter_type, include,
class_filter_array, array( your_class eg. product ) ) )}, {$:item.name|wash}{/section}" />
{section-else}
<meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
{/section}
{/section}
{/section}
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<meta name="generator" content="Exponential" />
{section show=$enable_link}
{include uri="design:link.tpl" enable_help=$enable_help enable_link=$enable_link}
{/section}
{/default}
it isn't elegant because of 3 queries, but it works. It is the extension of http://ez.no/community/forum/setup_design/search_engine_optimisation_more_efficient_use_of_the_title_tag Greetings ekke
http://www.coolscreen.de - eZ Publish, Ibexa, SOLR, Elastic Search
|