Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Add dynamic sites to Google Sitemap?

Go to End

16 Posts   2410 Views


19 July 2011 at 10:55pm Community Member, 175 Posts

hi there,

I generate pages from dataobjects, so this pages are not in the SiteTree. What would be the best solution to have this pages also in the sitemap.xml? Does anybody solved such a problem yet?



20 July 2011 at 8:59pm Forum Moderator, 5511 Posts

Download the latest google sitemap module (master) - this includes the ability to define dataobjects in the sitemap.xml


21 July 2011 at 1:53am Community Member, 175 Posts

Cool, looks great.


Ryan M.

3 November 2011 at 1:03pm (Last edited: 3 November 2011 1:11pm), Community Member, 309 Posts

Hey Will, what's your recommended way of adding DataObjects to the sitemap? I downloaded and checked out the code, and it seems I'm supposed to add the list of DataObjects to the array on line 44 of GoogleSitemap.php. So I put it there.
I also added GoogleSitemap::enable_google_notificaton(); to my config file, but that triggers a blank page on all pages of my site.

Ryan M.

3 November 2011 at 1:15pm Community Member, 309 Posts


Also tried GoogleSitemap::register_dataobject('Project', 'monthly', '0.9'); in my config file with the google notification, produces the same result as before.


9 November 2011 at 7:49am Community Member, 175 Posts


this may help:

Ryan M.

9 November 2011 at 8:04am Community Member, 309 Posts

Awesome! I was nearly ready to code my own modifications to googlesitemaps until you posted this.


10 December 2011 at 2:20am Community Member, 332 Posts

How i can get the dataobject location adress showing up in sitemap.xml
it gives it so
<loc/> *this is missing here

The pagetype is named Toodelist and it haves dataobject Toode

added in toode.php those lines but it didnt help:
//Return the Name as a menu title
   public function MenuTitle()
   return $this->Tootenimi;

   //Ensure that the DO shows up in menu (unclear whether this is needed or not)
       public function canView()
   return $this->Toodelist()->canView();

Go to Top