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

Redirect from parent to most current child

theme

Started by Nils 6 years ago · 4 replies · 907 views
6 years ago

Hi everybody,

I am pretty new to Grav and though I got pretty far with what I wanted to achieve, I have come across a problem that I am not able to solve by reading the great (!!!) documentation or following threads here in the forum.

Is there a way to redirect from a parent page to the most current child page? Or the first child page?

Any help is appreciated.

Kind regards
Nils

6 years ago

Hi @vfor , you could use the redirect option in your parent's page frontmatter:
https://learn.getgrav.org/16/content/headers#redirect

I do not know of an automatic way to do the first child, but if I recall correctly something like that is coming up in Grav 1.7 (not officially released yet).

Hope the above helps,
Paul

6 years ago

Thanks Paul. Leaves me waiting for 1.7 (or so). I thought there might be a trick using the sorting numbers and always use the first child then. Patience is a gift. ;-)

Best
Nils

👍 1
6 years ago

Hi @vfor, I've been able to track down the exact item in the ChangeLog for 1.7:
https://github.com/getgrav/grav/blob/1.7/CHANGELOG.md#v170-beta8 (read down list)

Does it sound like this might be a good match for your situation?

6 years ago

Hi @paulhibbitts and thanks for pointing me towards this list. Not quite sure yet - will have to give it a try once it is stable. As for now I am fine with relinking folders once a year, but always keen on finding ways to better automate tasks.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 9 hours ago
Support · by Anna, 3 days ago
2 59 12 hours ago
Support · by Justin Young, 13 hours ago
1 30 13 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago