Automatic Sitemap

By michal-frackowiak michal-frackowiak

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


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by michal-frackowiak

MyBlogLog recent visitors - 06 Jun 2021 04:03
Include Any Page - 06 Jun 2021 03:20
Babelfish Translation - 06 Jun 2021 03:14
Collapsible Text Block - 02 Dec 2020 10:24
Todo List - 18 Aug 2014 15:28
Multicolumn Layout - 17 Dec 2012 19:51
Zoho Writer - 16 Feb 2012 01:57
Zoho Sheet - 16 Feb 2012 01:56
Zoho Show - 16 Feb 2012 01:55
Zoho Polls - 16 Feb 2012 01:53
WoW Tooltips - 16 Feb 2012 01:52
Widgetbox Panel - 16 Feb 2012 01:52
Video from Revver - 16 Feb 2012 01:50
Tabs - 16 Feb 2012 01:45
Standalone Page Buttons - 16 Feb 2012 01:44
Social Bookmarking - 16 Feb 2012 01:42
Simple Gallery - 16 Feb 2012 01:41
Remember The Milk Todo - 16 Feb 2012 01:39
Recent Changes (mini) - 16 Feb 2012 01:36
Rating Summary - 16 Feb 2012 01:35
Quimble Poll - 16 Feb 2012 01:33
Quikmaps Maps - 16 Feb 2012 01:33
Photobucket Widget - 16 Feb 2012 01:29
Page Previews (Snap.com) - 16 Feb 2012 01:29
Pabpixies Gadgets - 16 Feb 2012 01:28
Meebo me - 16 Feb 2012 01:20
Layout With Tables - 16 Feb 2012 01:19
Instacalc - 16 Feb 2012 01:12
Import the Digg Feed - 16 Feb 2012 01:11
Import a News Feed - 16 Feb 2012 01:10
Google Gadgets - 16 Feb 2012 01:05
Gabbly chat - 16 Feb 2012 01:02
Forum Summary for the Front Page - 16 Feb 2012 01:02
Footnotes - 16 Feb 2012 01:01
Foldable List - 16 Feb 2012 01:01
Flickr Images By Tags - 16 Feb 2012 01:00
Feedburner - 15 Feb 2012 00:53
Extra Side Bar - 15 Feb 2012 00:51
Embed Code From Other Services - 15 Feb 2012 00:50
EditGrid Spreadsheets - 15 Feb 2012 00:49
Cornify - 15 Feb 2012 00:39
Compact Feed Display - 15 Feb 2012 00:35
Center Video - 15 Feb 2012 00:28
Bibliography/Footnotes/Comments Listed in TOC - 15 Feb 2012 00:26
Alexa traffic ratings - 15 Feb 2012 00:23
3d tagcloud - 15 Feb 2012 00:22


Rate this solution

If you think this solution is useful — rate it up!

rating: +100
page 1 of 21
Holyee2336 Holyee2336 23 Dec 2023 14:32

hm

Last edited on 23 Dec 2023 14:33 by Holyee2336
by Holyee2336 Holyee2336 , 23 Dec 2023 14:32
Phil Chett Phil Chett 07 May 2009 18:17

@ alan and e solutions.
this is why we wrote:-
http://community.wikidot.com/howto:how-to-use:option-buttons

by Phil Chett Phil Chett , 07 May 2009 18:17
Zatz Zatz 31 Jan 2013 16:10

thats nice and all but a lot of the documentation and useful information is a bit scattered.

by Zatz Zatz , 31 Jan 2013 16:10
Helmut_pdorf Helmut_pdorf 01 Feb 2013 09:36

is a bit scattered

? ? ?
What are you missing?

Go to the http://community.wikidot.com/start and you will get an overview where you will find all the snippets found by users, the "official" documentation you realy need and the howto's of the community.

At the end of this page on the right botttom you will see a lot of links…

Edit
I see you are a more experienced user now on your profil.. but the question is the same:

What should be done better?


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

Last edited on 01 Feb 2013 09:54 by Helmut_pdorf
by Helmut_pdorf Helmut_pdorf , 01 Feb 2013 09:36
Parent Setting on subordinate pages
(account deleted) 07 May 2009 18:04

I agree with Alan about the lack of applicable documentation for this feature, but I guess that's the purpose behind the forum. After some fiddling around, I found this feature relatively easy to use. Instead of using it throughout the site, however, I started it in one sub-section (KnowledgeBase, for example) and implemented the sitemap throughout the subordinate pages below KnowledgeBase. For each sub-section page, I simply added the name of the "parent" page ("KnowledgeBase") under +options | parent.

by (account deleted), 07 May 2009 18:04
Parent-setting needs to be documented better
Alan R King Alan R King 21 Dec 2008 23:28

It took me about an hour hunting around the wikidot documentation to discover something as simple and basic as how to set a page's parent, i.e. that I have to use + options etc. etc. It's as if the writers of the beginners' manual just forgot that people need to know that! It is hidden away in there somewhere but not in any obvious place. Please improve that aspect of the documentation for future users!

by Alan R King Alan R King , 21 Dec 2008 23:28
This is great!
Psammead Psammead 12 Sep 2008 20:39

Thank you, it makes my life easier and my site better!
Psammead

Last edited on 12 Sep 2008 20:39 by Psammead
by Psammead Psammead , 12 Sep 2008 20:39
breadcrumb
wowstrategy wowstrategy 08 Jul 2008 08:22

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

thx!

by wowstrategy wowstrategy , 08 Jul 2008 08:22
test
zjw0358 zjw0358 01 Apr 2008 10:28

hi.the first time

Last edited on 01 Apr 2008 10:30 by zjw0358
by zjw0358 zjw0358 , 01 Apr 2008 10:28
it doesn't worked...
tdl tdl 31 Mar 2008 17:10

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

by tdl tdl , 31 Mar 2008 17:10
Re: it doesn't worked...
tdl tdl 11 Jun 2008 16:31

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

by tdl tdl , 11 Jun 2008 16:31
Re: it doesn't worked...
Ding Dong Ding Dong 04 Jul 2008 03:53

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

by Ding Dong Ding Dong , 04 Jul 2008 03:53
Re: it doesn't worked...
Zap85 Zap85 07 Jul 2008 01:21

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

by Zap85 Zap85 , 07 Jul 2008 01:21
Re: it doesn't worked...
BrendanSimon BrendanSimon 19 May 2009 04:02

I see this too. I think the problem is that my start page just has text. i.e. no links.
All my links are in the side bar. I tried putting nav:side as the root but that doesn't seem to work either.
How can I set the root to the entire site ??

by BrendanSimon BrendanSimon , 19 May 2009 04:02
Re: it doesn't worked...
Helmut_pdorf Helmut_pdorf 19 May 2009 07:10

Do you use "parenting" ?

Not the links are building a site-map!

Every page you want to show up in the site map needs a "parent" -structure upwards till the "root".

This is not necessarily the start page - you can have more "page trees" on a site… perhaps someone inside as category - or other way round only the start-pages of a category connected up to a parent-page - to show in a site map the "structure" of your site and not the single entry pages of a "blog" or "news" category…

Necessary is the "parenting" ( set up at the bottom of the pages in the +"options" —> "parent" for every page.

This gives you automatically the "breadcrumb navigation" too.


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 19 May 2009 07:10
DavidPJohnson DavidPJohnson 11 Jan 2008 05:23

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?

by DavidPJohnson DavidPJohnson , 11 Jan 2008 05:23
Re:
dandanxu dandanxu 15 May 2008 03:14

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

by dandanxu dandanxu , 15 May 2008 03:14
Setting showRoot="false" does not work
flit flit 31 Dec 2007 01:51

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.

by flit flit , 31 Dec 2007 01:51
Re: Setting showRoot="false" does not work
leiger leiger 20 Jan 2008 09:31

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"]]

~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

by leiger leiger , 20 Jan 2008 09:31
page 1 of 21
page revision: 7, last edited: 15 Feb 2012 00:25
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /