Search code examples
urlslugbolt-cms

Bolt URL generation using slugs and content types


i am using bolt and i have a question about the URL generation.

whenever i create a content type and with a singular_name or singular_slug and a slug. it shows in the URL like this: www.example.com/singular_name/slug

and i want it to be www.example.com/slug nothing more than that. when i try to use singular_slug, it does the same.

becouse how i read this it should not add the singular_slug in the URL.

i hope someone can explain this to me or help me find a solution.

Edit. i understand the documentation of singular_slug now it just replaces the singular name. this still doesnt help much for my problem but still.

enter image description here it show this but i want the "vervolg 2/" to not show.


Solution

  • One thing you can do is set up an additional binding route for a contenttype you want on base, e.g.:

    pagebinding:
        path: /{slug}
        defaults:
            _controller: controller.frontend:record
            contenttypeslug: page
        contenttype: pages