A symfony 2 bundle that provides tools to build your application sitemap.

Installs: 311 393

Dependents: 8

Suggesters: 2

Stars: 130

Watchers: 26

Forks: 63

Open Issues: 25

Type: symfony-bundle

v1.4.2 2015-12-28 10:54 UTC


Build Status

Latest Stable Version Total Downloads

PrestaSitemapBundle on Knpbundles

PrestaSitemapBundle is a Symfony2 xml sitemap generator.

:speech_balloon: If you want to have some informations about the projet progression you can register to our google group


For a ready to use demonstration of PrestaSitemap you should check the prestacms-sandox available on github.

Sandbox is also deployed for a live demonstration :



  • Sitemapindex
  • Google images, video, mobile and multilang urls
  • Respect constraints (50k items / 10mB per files)
  • No database required
  • Optionnal caching (using LiipDoctrineCacheBundle, disabled by default)


  1. Installation

        "require": {
            "presta/sitemap-bundle": "dev-master"
        public function registerBundles()
            $bundles = array(
                new Presta\SitemapBundle\PrestaSitemapBundle(),
        resource: "@PrestaSitemapBundle/Resources/config/routing.yml"
        prefix:   /
  2. Usage

    For static url there's annotation support in your routes :

     * @Route("/", name="homepage", options={"sitemap" = true})

    For complexe routes, create a Closure or a Service dedicated to your sitemap then add your urls :

    use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
    // ...
        function(SitemapPopulateEvent $event) use ($router){
            //get absolute homepage url
            $url = $router->generate('homepage', array(), UrlGeneratorInterface::ABSOLUTE_URL);
            //add homepage url to the urlset named default
                new UrlConcrete(
                    new \DateTime(),
  3. Decorated url (images, videos, etc.)

    The doc is already really short ;)


You will find the detailed documentation in the following links :

Ask for help

:speech_balloon: If you need help about this project you can post a message on our google group


Pull requests are welcome.

Thanks to everyone who has contributed already.

This project is supported by PrestaConcept

Lead Developer : @nicolas-bastien

Released under the MIT License

Bitdeli Badge