Closed frodosghost closed 4 years ago
Hello !
I believe that account
is not the default section.
Can you try to add an event listener like this one to your project :
account.sitemap_listener:
class: Presta\SitemapBundle\EventListener\RouteAnnotationEventListener
arguments :
- '@router'
- 'account'
tags: ['kernel.event_listener']
Does it help ?
Thanks for the response. This suggested change does work, but moves all of the default
routes into the account
section.
I believe that
account
is not the default section.
@yann-eugone :: Correct. default
is still the default section. Was looking at adding another section, so that we could have multiple sections for specific routes.
Is there a way to use multiple sections, defined by annotations?
I thought it was possible, but recently I figured out that it is not...
By now, the only way to do it is to register these static routes by yourself in a custom event listener.
It is clearly a bug, and I'm not sure to understand why this is not possible. I was planning to work on a fix on this for the next release.
Can you try #231 ?
composer require presta/sitemap-bundle:dev-multiple-static-sections@dev
@yann-eugone :: It does work. Does exactly what is needed.
section
configuration, and it shows the "default" sitemap, with listed routes.account
, which created a new sitemap file with specified routes listed within.Released in v2.1.0
Having a problem with the
section
variable when setting up the sitemap bundle using annotations. Wondering where I am going wrong, any advice?Route setup is below:
In the base
sitemapindex
the link to the section displays.Visiting the URL generated returns a 404.