I’m trying to find a way to ‘group’ pages in a structure, where that group page has no function other than to visually organise the entries in the structure, and does not need to be part of the url structure.. eg:
- Major Campaigns
type: landingPageGroup
slug: major-campaigns
- Moving Office
type: landingPage
slug: moving-office
uri: /moving-office
- Your Moving Checklist
type: landingPage
slug: your-moving-checklist
uri: /moving-office/your-moving-checklist
- Major Events
type: landingPageGroup
slug: major-events
- Conference 2016
type: landingPage
slug: conference-2016
uri: /conference-2016
- Agenda
type: landingPage
slug: agenda
uri: /conference-2016/agenda
If I set the Entry URL Format to:
Top level: {% if entry.type != 'landingPageGroup' %}{slug}{% endif %}
Nested: {% if object.parent.type != 'landingPageGroup' %}{parent.uri}{% endif %}/{slug}
...the URLs look correct in the entries listing, but it will throw a 404 when you try to access them... is there anyway I can get around this with some custom routing maybe?