Forums / General / SEO and page_head

SEO and page_head

Author Message

Stuart DH

Tuesday 04 January 2005 4:08:07 pm

I was wondering what mods people are using to get the best SEO results with 3.5. For example, what would be the best way to set up the page_head.tpl to get dynamic meta keywords based on the content of each page.

Also, I'm finding that my site is being grabbed fairly well by google and yahoo but none of the images appear on a google image search despite having the keywords in the name, alt tags and jpg filename.

Any help would be much appreciated.

http://www.wildaboutbritain.co.uk

Kristian Hole

Friday 07 January 2005 1:32:24 am

Not finding your images on google images is probably because the google images is not updated very often.

http://yro.slashdot.org/yro/04/11/07/2043207.shtml

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Stuart DH

Friday 07 January 2005 2:05:50 am

Thanks for the info Kristian...certainly looks to be a google thing, which saves me having to try an tinker about with eZ publish.

Cheers

Stuart

http://www.wildaboutbritain.co.uk

Filippo Ferrari

Monday 31 October 2005 2:18:14 am

And something about dynamic meta data keyword and description in page_head.tpl?

Thanks

bisk

Monday 31 October 2005 3:59:55 am

For most of the pages I've added a custom title and meta-description, two text lines per class. Else I just fetch the node name and a description based on the title path. I'm not really bothered with the meta-keywords as it holds little to no value for seo.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Filippo Ferrari

Monday 31 October 2005 5:25:58 am

I've created a set of keywords with the reverse path :

{set-block scope=root variable=site_keyword}
{section loop=$Path:reverse_path}{$:item.text|wash}{delimiter}, {/delimiter}{/section}
{/set-block}

Could you post a little code ex. for the tag description

For exemple put product short description in meta description

Bye

bisk

Monday 31 October 2005 6:38:17 am

The short description is a xml field. You'll have to use strip tags operator if you want to use the short description.

Make sure that your template.ini.append.php has: [php]
PHPOperatorList[striptags]=strip_tags

template code:

{let node_description=fetch( content, node, hash( node_id, $module_result.node_id ) )}
{section show=$node_description.object.data_map.short_description.has_content}
<meta name="description" content="{$node_description.object.data_map.short_description.content.output.output_text|striptags|shorten(160)}" />
{/section}
{/let}

|shorten(160) is optional and will limit the description to no more than 160 characters.

I prefer a custom text line for the meta-description though. No duplicate content and I can make a description to lure visitors to the site.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Filippo Ferrari

Monday 31 October 2005 7:40:26 am

Thanks it works fine, but the custom text line for the meta-description it's a better solution for me too. How to render a single line data in template language?

Is this the correct method?

<meta name="description" content="{attribute_view_gui attribute=$node.object.data_map.meta_description}" />

Betsy Gamrat

Sunday 05 November 2006 1:29:45 pm

Hi,

One SEO approach is as follows:

Create a custom class with the meta and other data you would like to use. This class requires one attribute of the type <b>object relations</b>. Then, use http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/reverse_related_objects to access the files, with code similar to this in <b>page_head.tpl</b>.

{def $meta_data=fetch( 'content', 'reverse_related_objects',
           hash( 'object_id',$node.contentobject_id,'all_relations',FALSE))}
 {if count($meta_data)|eq(0)}
    {section name=meta loop=$site.meta}
      <meta name="{$meta:key|wash}" content="{$meta:item|wash}" />
    {/section}
  {else}
    <meta name="keywords" content="{$meta_data.0.data_map.keywords.content|wash}" />
    <meta name="description" content="{$meta_data.0.data_map.description.content|wash}" />
    <meta name="robots" content="{$meta_data.0.data_map.robots.content|wash}" />
  {/if}
{undef}

To use the class, create an object of that class, assign the related objects and publish it.

Juliusz Calyniuk

Monday 06 November 2006 2:17:01 am

Hello,

Perhaps this article would be interesting:
http://ez.no/community/articles/ez_publish_search_engine_optimization

Best regards

WebStyle Systems | http://www.ws-webstyle.com

Eric Goldman

Wednesday 19 May 2010 11:17:05 pm

Hello,

I've been trying to implement this, but I guess I am missing something. I edited the included article type to add two new fields with identifiers of "meta_description" and "meta_keys" as suggested in the SEO article.  There seems to be something missing from his example because there is a closing section tag but no opening one. I also tried using the short title as suggested above, but with that code its not printing anything. Is this template code no longer valid in 4.3? I am new to eZ and evaluating it before I take a lot of time to learn all the specific codes. I know that meta is not important for SEO, but it is important when Facebook or Digg indexes or presents your page since this is where it will fill the information for the preview or its own indexing.

Can someone please link me to a current resource which spells this out a little better or provide me with the exact steps in they have the time. I don't quite understand the reverse relationship suggestion above, but it sounds to be an even better way for reusability, so if can provide some more information or an example from a working ez 4.3 I would really appreciate it. If there is an easier way to do this now, please let me know - I cannot have a site where every page has the same meta data.

 

Thank you,

Eric