Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Default route override not working?

Solved by pamtbaau View solution

Started by Robert 8 years ago · 3 replies · 465 views
8 years ago

I have a page with the folder name lorem-ipsum, but want to use the wordpress style, so I was trying to set the default route override for the page to 2018/08/03/lorem-ipsum. When I refresh the blog home page, the new route is used for the link, but when I click it, I get a 404 error.

I have also tried to replace the '/' with an 'x', but that does not matter.

So my assumtion is, that page level default route overrides are not working?

Does anyone know why?

8 years ago Solution

@metbril Prepend the default route in the frontmatter with a slash... See Routes

YAML
routes:
  default: '/2018/08/03/lorem-ipsum'
👍 1
8 years ago

@pamtbaau:
Prepend [...] with a slash

That worked. My mistake. :man_facepalming:

8 years ago

Maybe you need to check your 'bril' at the optician? 😉

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 60 17 hours ago
Support · by Anna, 3 days ago
2 66 19 hours ago
Support · by Justin Young, 20 hours ago
1 34 20 hours ago
Support · by Duc , 1 week ago
2 70 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago