Automatic Sitemap

Description

It is quite important to have a nice and clean structure of the site. One of the best ways to do maintain such a structure is to use the "parent page" relation. This allows to:

  • display breadcrumb navigation element within pages
  • make nice sitemaps and listings

Below you will find a piece of code to make a "tree view" of pages also called "sitemap".

Code

If you want to start from the main page ("start"), just use the code:

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

In action

http://morgdan.wikidot.com/mapa-do-site
http://zeroinfluence.wikidot.com/phoarmats:overview
http://potlatch.wikidot.com/sitemap
http://allyrics.wikidot.com/mappa-del-sito

Rate this solution

If you think this solution is useful — rate it up! Or dump it otherwise.

rating: +67+x

Comments

Changing the parent of existing pages
dreamszzdreamszz 1186499855|%e %b %Y, %H:%M %Z|agohover

Good to know that you can change the parent of existing (or new) pages by clicking on the +options button (lower right).

Set the parent of your current page to something that makes sense, i.e. "start".

unfold Changing the parent of existing pages by dreamszzdreamszz, 1186499855|%e %b %Y, %H:%M %Z|agohover
tks but.....
jftamamesjftamames 1196902336|%e %b %Y, %H:%M %Z|agohover

…. What is the order form pages?

unfold tks but..... by jftamamesjftamames, 1196902336|%e %b %Y, %H:%M %Z|agohover
Setting showRoot="false" does not work
flitflit 1199065866|%e %b %Y, %H:%M %Z|agohover

This is very useful! One small thing, though:

I am using the following settings:

[[module PageTree root="wow" showRoot="false" depth="30"]]

This still shows the "wow" page as the root of the tree. I'd prefer that it hide it and show only the children and their children.

unfold Setting showRoot="false" does not work by flitflit, 1199065866|%e %b %Y, %H:%M %Z|agohover
Re: Setting showRoot="false" does not work
leiger40leiger40 1200821470|%e %b %Y, %H:%M %Z|agohover

Not exactly sure what the solution to that is, but I do know that showRoot must be set to "true", i.e. if you do not wish to have it set to true, do not include it at all. Try that, and see if it fixes your problem.

[[module PageTree root="wow" depth="30"]]
unfold Re: Setting showRoot="false" does not work by leiger40leiger40, 1200821470|%e %b %Y, %H:%M %Z|agohover
Demos2010Demos2010 1200029028|%e %b %Y, %H:%M %Z|agohover

do you know if there is a way to automatically set the parents for pages created with a "new page" module on a particular page?

unfold by Demos2010Demos2010, 1200029028|%e %b %Y, %H:%M %Z|agohover
Re:
dandanxudandanxu 1210821242|%e %b %Y, %H:%M %Z|agohover

I would *love* to see something like this, perhaps in a template or something. or at least a shortcut for setting parents. as is, its waaay too slow, essentially manually curating a sitemap

unfold Re: by dandanxudandanxu, 1210821242|%e %b %Y, %H:%M %Z|agohover
it doesn't worked...
tdltdl 1206983410|%e %b %Y, %H:%M %Z|agohover

just show "Welcome to your new Wikidot site" :-(

unfold it doesn't worked... by tdltdl, 1206983410|%e %b %Y, %H:%M %Z|agohover
Re: it doesn't worked...
tdltdl 1213201885|%e %b %Y, %H:%M %Z|agohover

Still not working :-(

i did [[module PageTree root="start"]] and
[[module PageTree root="start" showRoot="true" depth="30"]]

is just showing a single link to the start page

unfold Re: it doesn't worked... by tdltdl, 1213201885|%e %b %Y, %H:%M %Z|agohover
Re: it doesn't worked...
Ding DongDing Dong 1215143586|%e %b %Y, %H:%M %Z|agohover

Yes, I also facing this problem, can anyone solve it ???

unfold Re: it doesn't worked... by Ding DongDing Dong, 1215143586|%e %b %Y, %H:%M %Z|agohover
Re: it doesn't worked...
Zap85Zap85 1215393668|%e %b %Y, %H:%M %Z|agohover

you have to establish a parenthood relationship between a page and the page start by pressing the +options buttons and then the parent button :)

unfold Re: it doesn't worked... by Zap85Zap85, 1215393668|%e %b %Y, %H:%M %Z|agohover
test
zjw0358zjw0358 1207045733|%e %b %Y, %H:%M %Z|agohover

hi.the first time

last edited on 1207045814|%e %b %Y, %H:%M %Z|agohover by zjw0358 + show more
unfold test by zjw0358zjw0358, 1207045733|%e %b %Y, %H:%M %Z|agohover
breadcrumb
wowstrategywowstrategy 1215505335|%e %b %Y, %H:%M %Z|agohover

is there a way to change the breadcrumb navigation display using css?

thx!

unfold breadcrumb by wowstrategywowstrategy, 1215505335|%e %b %Y, %H:%M %Z|agohover
Add a new comment
page tags: parent sitemap structure
page_revision: 6, last_edited: 1217318956|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License