If you are scanning one of the current indexes (WebTopicList and WebIndex) for a specific topic you have no idea which other topics are related e.g. which topics are child topics.
With the help of TreePlugin you can easily turn your index into a sitemap.
As you can see in the screenshot all topics are displayed by hierarchy and alphabet.
How To:
The top level topic in this example is the WebHome (renamed in this example).
Therefore the WebHome needs to be the root of all topics in your web.
To get all the Web* Topic out of the normal list I introduced a topic called "SystemSeiten" (which means SystemTopis)
This topic becomes root topic of all topics that start with Web*.
To keep the indexes in the TWIKIWEB intact and update safe I created a topic called WebSiteMap in my TWIKIWEB with the following code:
---+ Site Map of %BASEWEB%
*Site maps in other webs:*: %WEBLIST{format="[[$name]]" separator=", "}%
<div style="border:1px solid silver; background:#EFEFEF; padding:10px; font-size:90%; line-height: 1.5;">
%TREE{web="%BASEWEB%" formatting="ullist"}%
</div>
This produces the above output.
If you simply put %INCLUDE{"TWiki.WebSiteMap"}% in each of your webs index topics you have a handy site map and index in one.
and you can easily jump to sitemaps in other webs.
NOTE: This was tested on Twiki installation with relatively few topics. I don't know how this works if you have several thousands of topics. But it works very well on our TWiki.
The next step would be to use some JavaScript to fold and unfold the hierarchy levels.
Comments
FranzJosefGigler - 12 Sep 2007:
Carlo, have you ever tried TreeBrowserPlugin?
CarloSchulz - 13 Sep 2007:
I tried to combine it with TreePlugin but I had give up on this one because it didn't work as documented.
MarcoSilva - 16 Sep 2007:
Nice tip, I would like to try but without the TreePlugin, using only inline search did you try ? Maybe with METASEARCH variable. Anyway thks the tip.
SteveJonesST - 19 Sep 2007:
Hi Carlo.
I got the TreeBrowser and TreePlugin working together like this:
%TREEBROWSER{"thread" title="<h3>Topic Tree Of %WEB%</h3>" openAll="on"}%
%TREEVIEW{formatting="outline" format="* [[$topic]]" levelprefix=" "}%
I put one of these in every new web created. Hope it's helpful.
JacekZapotoczny - 20 Sep 2007:
We wanted to publish sitemaps from selected webs on a Main. To do this we've used formatting as stated above by Steve. But unfortunately including such a number of sitemaps to a single topic was time consuming while the loading time of a homepage was crucial for us. Then we've found a plugin combination which helped us (TwistyPlugin, TreePlugin, TWikiAjaxContrib). Here I'll try to explain the essentials.
First (TreePlugin) for each web there was created a WebSiteMap topic with the following content:
where WEB1 and WEB2 are the names of existing webs.
And last (TWikiAjaxContrib), we've added some JS code to fill up div's with a content on demand (onclick).
To do that first add some JS to the page header with %AJAX% tag placed at the begining of the page. Then place the following to the bottom of the page.
The trick is we don't load WebSiteMaps just on homepage open but only when the user requests it. This saves a lot of time on homepage load which takes now 1.6s according to Apache Benchmark. And the last but not least it looks pretty fancy on the page CarloSchulz - 20 Sep 2007:
Sweet, thanks a lot everyone. Will try to refactor this into a new article.
SeanCMorgan - 27 Aug 2008:
For more on this subject, see HowToEditWebTopicList.
Since I wrote that, I've decided not to reparent the orphaned pages, but rather just to leave them out of the tree by default (and a link to refresh the page with the orphans showing). That's because all my 'adoption' work on the TWiki web was lost when I upgraded.
I also moved the alphabetical list to a separate topic (instead of hiding it in a twisty) to make the page load faster.
P.S. MarcoSilva (16 Sep 2007) wrote, "I would like to try but without the TreePlugin". You can make a SiteMapUsingNestedSearch, but I wouldn't recommend it (TreePlugin is faster).