Share » Learn » eZ Publish » eZ Publish Search Engine Optimization

eZ Publish Search Engine Optimization

Saturday 17 June 2006 1:22:00 pm

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The <meta> tags (description, keywords, etc.) are determined by the settings in the system configuration file ( site.ini). eZ Publish adds the tags automatically to the <head> section of the generated XHTML document.

Metadata configuration in the site.ini file:

[SiteSettings]
# List of metadata to set in pagelayout
MetaDataArray[author]=eZ systems
MetaDataArray[copyright]=eZ systems
MetaDataArray[description]=Content Management System
MetaDataArray[keywords]=cms, publish, e-commerce, content management

The page_head.tpl template file extracts the meta tags from the above configuration:

{section name=meta loop=$site.meta}
   <meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
{/section}

Adding keywords and descriptions to class definitions can provide an additional level of content information that search engines can use. Template scripts can insert the keywords and descriptions into the meta tags.

Additional attributes in the definition of the content class.

This simple script template can insert keywords and a description into meta tags:

{let node_metas=fetch(conten, node, hash(node_id, $module_result.node_id))}
 <meta name="description" content="{$node_metas.object.data_map.meta_description.content.output.output_text}" />
 <meta name="keywords" content="{$node_metas.object.data_map.meta_keys.content.output.output_text}" />

 {/section}

{/let}
36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)