Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 967 Bytes

1-installation.md

File metadata and controls

55 lines (41 loc) · 967 Bytes

Bundle installation

Require the bundle as a dependency.

composer require presta/sitemap-bundle

Enable it in your application Kernel.

<?php
// config/bundles.php
return [
    //...
    Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true],
];

Or in your legacy application.

<?php
// app/AppKernel.php
class AppKernel
{
    public function registerBundles()
    {
        $bundles = [
            //...
            new Presta\SitemapBundle\PrestaSitemapBundle(),
        ];

        //...

        return $bundles;
    }
}

Import routing.

# config/routes/presta_sitemap.yaml
presta_sitemap:
    resource: "@PrestaSitemapBundle/config/routing.yml"

Note you may not be required to import routing if you would only rely on dumped sitemaps. Jump to dedicated documentation for more information.


« READMEConfiguration »