|Number of votes:||0|
I often find it is necessary to use pages just to structure other pages in a site. Many of you have probably at one time or another had a page in your web site root called [Footer menu] or something similar. Editors do this too, to group or tuck away a number of pages that, for example, don’t fit into the menu structure.
Generally you want those container pages to show as little as possible. If some visitor end up on such a page, for example by erasing the last part of the URL when looking at www.site.com/Footer/Contacts if there were such a page, they would most likely be looking at a pretty empty (ugly, boring…) page.
So you say “hey, just use the built-in feature to redirect the container to some useful page”. Sure, that works fine. But it’s likely editors will forget to do it from time to time. A different approach is to create a special container page type, and build the redirect mechanism into the page template. I think editors are more likely to remember to use the special page type when creating a container.
I have constructed several different variants of this page type. This is a simple one.
If the page is viewed in edit mode it does not redirect, it merely displays a message (in the form of a link) to where it would redirect in view mode. If the redirect target property is not set it simply redirects to it’s parent.
Some variations of the concept I have used: