Create an Automatic Navigation without parent-childs

Posted by gerdami on 12 Jun 2007 22:16, last edited by GoVegan on 09 May 2010 05:38

Tags: backlinks category index structure

rating: +12+x

The most obvious navigation system is the parent-child relationship which produces automatic breadcrumbs navigation at the top of the page. This article shows two different techniques which can produce an automatic navigation without it.


The parent-child relationship allows the creation of sitemap pages with the module PageTree.
However, after the creation of each page, the user (or later the moderator) must set its parent page, otherwise the new page can be lost or orphaned. Many posts in the community forum call for automatic parent-child relationship.

This article shows two different techniques which can produce an automatic sitemap, with one caveat I admit, only one level of depth. Both use the module NewPage with an associated template. The user can forget to set the parent-child relationship.

Index by Backlinks

1. create the template:backlinks
In the URL box of your browser, just type "http://yourwiki.wikidot.com/template:backlinks".
If this page does not exist, click on *create page and type this:

[[[IndexBacklinks]]] >>
----
Enter your text here

2. create the Index by Backlinks page
In the URL box of your browser, just type "http://yourwiki.wikidot.com/indexbacklinks".
If this page does not exist, click on *create page and type this:

[[module NewPage template="template:backlinks"]]
----
[[module Backlinks]]

3. add pages to your wiki by using the create page box
All new pages created like this will have at the top, a link to the IndexBacklinks page.
In turn, the IndexBacklinks page will list automatically all pages that link to it thanks to the module Backlinks.
4 In action
http://sandbox.wikidot.com/indexbacklinks
or
http://sandbox.wikidot.com/mainindex


Index by Category

1. create the template:cat1
In the URL box of your browser, just type "http://yourwiki.wikidot.com/template:cat1".
If this page does not exist, click on *create page and type this:

[[[cat1:index|Category cat1:Index]]] >>
----
Enter your text here

2. create the Cat1:Index page

[[module NewPage category="cat1" template="template:cat1" ]]
----
[[module Pages category="cat1" ]]

3. add pages to your wiki by using the create page box
All new pages created like this will have at the top, a link to the "Category cat1:Index" page.
In turn, the "Category cat1:Index" page will list automatically all pages that belong to the cat1 category thanks to the module Pages.
4. In action
http://sandbox.wikidot.com/cat1:index


Sitemap for a parent-child structure

For those who missed it …

[[module PageTree root="start" showRoot="true"]]

… or choose another start page.
Or use the simple

[[module ChildPages]]

which lists alphabetically children pages of the current page.


References

http://www.wikidot.com/doc:site-structure
http://www.wikidot.com/doc:backlinks-module
http://www.wikidot.com/doc:pages-module
http://www.wikidot.com/doc:childpages-module
http://www.wikidot.com/doc:pagetree-module


Authors

gerdamigerdami. Please visit his/her userPage.


Rate this howto

rating: +12+x

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.