We use this plugin to dynamically generate a sitemap.xml for a Symfony project.
First
cd plugins
git clone git://github.com/mbrung/sfDoctrineSitemapPlugin.git
Then add, to your ProjectConfiguration
$this->enablePlugins('sfDoctrineSitemapPlugin');
Finally, enable the sitemap module by adding, to your settings.yml:
all:
.settings:
enabled_modules: [default, sfDoctrineSitemap]
The plugin adds a sfDoctrineSitemap
route, pointing to sitemap.xml
.
By default the sitemap module will try and look for a Page model.
You can customize what models to look for by overriding the getObjectsForSitemap
method in the controller.
By adding a partial, named _url_CLASSNAME.xml.php