I have a Template Group set up as follows:
ask_us.group/index.html
ask_us.group/post.html
As you can possibly tell this is for a Blog type of area on a website. The index.html is supposed to list the latest posts, with pagination. The post.html is for an individual post. Pretty simple.
It all works as expected when using default URL's which go off the Template Group name, e.g.
- http://domain.com/ask_us (index.html)
- http://domain.com/ask_us/P2 (index.html, with pagination)
- http://domain.com/ask_us/an-example-post (post.html)
I want to use the Template Routes so that "ask_us" is formatted "ask-us" (dash rather than underscore).
So I've taken a look at the documentation (which is awful, by the way) and can't for the life of me get this to work.
The routes I set up are as follows:
- Template: ask_us/index.html
- Route: /ask-us/{page:pagination}
- Segments required: No
This gives a 404 error when going to http://domain.com/ask-us.
If I remove the /{page:pagination}
bit so the route is just /ask-us
it will load the index.html but break the pagination.
Why is this so damn complicated, and how can I fix it?
One solution you might say is just to rename "ask_us.group" to "ask-us.group" but I really don't see why I should use hacks like that just because the documentation is so poor.