Autoparenting

Posted by gerdami on 25 Aug 2009 07:54, last edited by James Kanjo on 09 May 2010 05:31

Tags: beadcrumbs child parent

rating: +6+x

Introduction

The parent-child relationship helps creating structured websites, sitemaps and breadcrumbs navigation.

The old way

At the bottom of a page, click on + options, parent and choose the parent page

The new way

default category

Create or edit the _template and add the following

%%content%%
[[module NewPage button="Add a child page" parent="%%full_page_name%%"]]

other categories

Create or edit the cat1:_template and add the following

%%content%%
[[module NewPage button="Add a child page" parent="%%full_page_name%%" category="%%category%%"]]

_start page

Remember that pages whose name starts with an underscore (like "_start", "_header", etc.) are not affected by the _template. Hence you would have to add the module NewPage on that page as well.
Another solution would be to use a start page that does not starts with an underscore and add a hidden tag _system to prevent the start page from being listed by ListPages.

Author

gerdamigerdami. Please visit his/her userPage.


Related articles

Comments

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.