Sitemap activation

A forum for Bolt related questions / issues

Sitemap activation

Postby rbx » Sat Mar 08, 2014 2:42 pm

Hi guys,

I am trying to enable the sitemap extension.
After adding it to the extension list in the config.yml it now appears in the list of active extensions under bolt/extensions.
However, no sitemap.xml has been created yet. How do I trigger the creation? I tried clearing the cache and updating the DB, but no effect.
Anything I am missing?
Thanks!
rbx
 
Posts: 12
Joined: Wed May 01, 2013 1:31 pm

Re: Sitemap activation

Postby rbx » Sat Mar 08, 2014 3:09 pm

Ok, it looks like this is caused by my custom route at the end of the routing file:

Code: Select all
pagebinding:
  path:               /{slug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::record', 'contenttypeslug': 'page' }
  contenttype:        pages

If I remove it, then sitemap.xml is generated fine. But I still want my /{slugs} to translate to pages...
I am trying to add another custom routing entry for the sitemap, but not quite sure what to put for the defaults and so on...

How can I do that?

Here is my full routing.yml :

Code: Select all
homepage:
  path:               /
  defaults:           { _controller: 'Bolt\Controllers\Frontend::homepage' }

search:
  path:               /search
  defaults:           { _controller: 'Bolt\Controllers\Frontend::search' }

preview:
  path:               /preview/{contenttypeslug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::preview' }
  requirements:
    contenttypeslug:  'Bolt\Controllers\Routing::getAnyContentTypeRequirement'

contentlink:
  path:               /{contenttypeslug}/{slug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::record' }
  requirements:
    contenttypeslug:  'Bolt\Controllers\Routing::getAnyContentTypeRequirement'

taxonomylink:
  path:               /{taxonomytype}/{slug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::taxonomy' }
  requirements:
    taxonomytype:     'Bolt\Controllers\Routing::getAnyTaxonomyTypeRequirement'

contentlisting:
  path:               /{contenttypeslug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::listing' }
  requirements:
    contenttypeslug:  'Bolt\Controllers\Routing::getPluralContentTypeRequirement'

pagebinding:
  path:               /{slug}
  defaults:           { _controller: 'Bolt\Controllers\Frontend::record', 'contenttypeslug': 'page' }
  contenttype:        pages
Last edited by rbx on Sat Mar 08, 2014 5:39 pm, edited 1 time in total.
rbx
 
Posts: 12
Joined: Wed May 01, 2013 1:31 pm

Re: Sitemap activation

Postby rbx » Sat Mar 08, 2014 3:25 pm

Ah, sorry for asking before looking properly.

Adding a slash, as suggested here, seems to solve it, although can't say I understand the solution.

Thanks!
rbx
 
Posts: 12
Joined: Wed May 01, 2013 1:31 pm


Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron