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

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 05:11:16
Script start
Timing: Jan 18 2025 05:11:16
Module start 'layout'
Timing: Jan 18 2025 05:11:16
Module start 'content'
Timing: Jan 18 2025 05:11:17
Module end 'content'
Timing: Jan 18 2025 05:11:17
Script end

Main resources:

Total runtime0.8813 sec
Peak memory usage4,096.0000 KB
Database Queries91

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.7891152.6094
Module start 'layout' 0.00620.0031 740.398439.4141
Module start 'content' 0.00930.8689 779.8125814.7578
Module end 'content' 0.87820.0031 1,594.570324.1875
Script end 0.8812  1,618.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3708160.0002
Check MTime0.00130.1511160.0001
Mysql Total
Database connection0.00100.115410.0010
Mysqli_queries0.792289.8860910.0087
Looping result0.00100.1163890.0000
Template Total0.840795.420.4204
Template load0.00210.233820.0010
Template processing0.838695.157720.4193
Template load and register function0.00020.018410.0002
states
state_id_array0.00230.256210.0023
state_identifier_array0.00110.127620.0006
Override
Cache load0.00180.2083560.0000
Sytem overhead
Fetch class attribute can translate value0.00080.089270.0001
Fetch class attribute name0.00150.1731140.0001
XML
Image XML parsing0.00420.473370.0006
class_abstraction
Instantiating content class attribute0.00000.0039140.0000
General
dbfile0.00470.5337280.0002
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs