src/Kunstmaan/SitemapBundle/Controller/SitemapController.php
public function sitemapAction($locale)
    {
        $nodeMenu = $this->get('kunstmaan_node.node_menu');
        $nodeMenu->setLocale($locale);
        $nodeMenu->setIncludeOffline(false);
        $nodeMenu->setIncludeHiddenFromNav(true);
        $nodeMenu->setCurrentNode(null);

        return array(
            'nodemenu' => $nodeMenu,
            'locale' => $locale,
        );
    }
public function sitemapAction($locale)
    {
        $nodeMenu = $this->get('kunstmaan_node.node_menu');
        $nodeMenu->setLocale($locale);
        $nodeMenu->setIncludeOffline(false);
        $nodeMenu->setIncludeHiddenFromNav(true);
        $nodeMenu->setCurrentNode(null);

        return array(
            'nodemenu' => $nodeMenu,
            'locale' => $locale,
        );
    }
public function sitemapAction ( $ locale ) { $ nodeMenu = $ this -> get ( 'kunstmaan_node.node_menu' ) ; $ nodeMenu -> setLocale ( $ locale ) ; $ nodeMenu -> setIncludeOffline ( false ) ; $ nodeMenu -> setIncludeHiddenFromNav ( true ) ; $ nodeMenu -> setCurrentNode ( null ) ; return array ( 'nodemenu' => $ nodeMenu , 'locale' => $ locale , ) ; }
This will generate a sitemap for the specified locale.
Use the mode parameter to select in which mode the sitemap should be
generated. At this moment only XML is supported

@Route("/sitemap-{locale}.{_format}", name="KunstmaanSitemapBundle_sitemap",
requirements={"_format" = "xml"})
@Template("KunstmaanSitemapBundle:Sitemap:view.xml.twig")

@param $locale

@return array
This will generate a sitemap for the specified locale . Use the mode parameter to select in which mode the sitemap should be generated . At this moment only XML is supported