Forums / Setup & design / Problem with the GoogleSiteMaps Extension

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problem with the GoogleSiteMaps Extension

Author Message

Sébastien Antoniotti

Monday 03 September 2007 1:43:02 am

Hi,

I have a problem with the GoogleSiteMaps Extension : I have copied the extension folder into /extension, activated it, and copied googlesitemaps.ini.append.php into the settings/siteaccess/(mypublicsiteaccess)/ folder.

Here is my googlesitemaps.ini.append.php :

#?ini charset="iso-8859-1"?

[Classes]

#set include to include objects of classes listed in Class_Filter_Array
#set exclude to exclude objects of classes listed in Class_Filter_Array
Class_Filter_Type=include

#setting array to include/exclude classes in sitemap
Class_Filter_Array[]
Class_Filter_Array[]=folder
Class_Filter_Array[]=artiste
Class_Filter_Array[]=album
Class_Filter_Array[]=chanson
Class_Filter_Array[]=actu
Class_Filter_Array[]=guitar_pro
Class_Filter_Array[]=tablature
Class_Filter_Array[]=article

[NodeSettings]
#set false to include only main node of content object in sitemap
#set true to include all nodse of content object in sitemap
Main_Node_Only=false

#<changefreq> based on depth of node
Node_Depth_ChangeFreq[]
Node_Depth_ChangeFreq[]=always
Node_Depth_ChangeFreq[]=hourly
Node_Depth_ChangeFreq[]=daily
Node_Depth_ChangeFreq[]=weekly
Node_Depth_ChangeFreq[]=monthly
Node_Depth_ChangeFreq[]=yearly
Node_Depth_ChangeFreq[]=never

#<priority> based on depth of node
Node_Depth_Priority[]
Node_Depth_Priority[]=1
Node_Depth_Priority[]=0.9
Node_Depth_Priority[]=0.8
Node_Depth_Priority[]=0.7
Node_Depth_Priority[]=0.6
Node_Depth_Priority[]=0.5
Node_Depth_Priority[]=0.4

So the sitemap is not correctly build when accessing the url : http://www.sunemu.net/index.php/fr/layout/set/googlesitemap/content/view/googlesitemaps/2 there is just a line...

I'am using a 3.8.6 version.

Thanks for your help !

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Monday 03 September 2007 2:07:05 am

I've solved a part of my problem by editing the googlesitemap.tpl, but I need to found a solution for the first line who refer the sitemap url...

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Monday 03 September 2007 3:01:53 am

Here is the part of the template that I've modified :

 <url>
    <loc>http://www.sunemu.net</loc>
    <lastmod>{currentdate()|datetime('custom', '%Y-%m-%d')}</lastmod>
    <changefreq>hourly</changefreq>
    <priority>1</priority>
   </url>  

{else}
   <url>
    <loc>{concat('http://www.sunemu.net/index.php',$node.url_alias|ezurl(no))|extlinkfix(del_layout)}</loc>
    <lastmod>{$node.object.modified|datetime('custom', '%Y-%m-%d')}</lastmod>
    <changefreq>{$changefreq[$depth]}</changefreq>
    <priority>{$priority[$depth]}</priority>
   </url>  
{/if}

It's not very clean but it works fine ;)

Now I'll configure a cron who have to ping google weekly with my sitemap.xml.

eZ Publish Freelance
web : http://www.webaxis.fr

Xavier Dutoit

Monday 03 September 2007 8:53:58 am

Hi,

Not a big fan of the priority based on how deep the node is.

Eg: the folder that contains your blog articles should have a lower priority than each post, shouldn't it ?

(thinking loud...)

http://www.sydesy.com

Sébastien Antoniotti

Monday 03 September 2007 9:12:23 am

Hi Xavier,

You're right, and I have added 2 arrays with the class identifier for key and the priority or the ChangeFrequence for value, so in my fetch I have the priority that I want for each classes ;)

eZ Publish Freelance
web : http://www.webaxis.fr