0

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.

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.

1 Answer 1

0

You can give the template group a 'route override'. With this setting you can override the default group/template routing.

Go to the template manager -> go to the template group you would like to change -> click the gear icon -> access -> Template route override

Now you can edit the routing. So if you put 'ask-us' here it will probably fix your problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.