Question
Hello, I'd like to list the topics of the current web in its WebHome, but only those topics that are custom made.
I don't actually need the topics starting with Web...(except for WebPreferences, WebLeftBar) in my newly created webs, so I guess deleting them would do what I want...Is this a good idea?
I believe hiding them in the topic list would be better, so they are still there if needed. I don"t want to restrict access or anything, I'd just like to have a list where there's only the relevant information showing - and in this case that's only the newly created topics that don't come with the installation.
Is there some kind of variable I could use?
Regards, Anne
Environment
--
EichelhardtAnne - 25 Sep 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
There is no built-in solution, but here is mine:
List all the "system" topics in a variable in your Main.TWikiPreferences, e.g:
- Set SYSTEMTOPICS = WebAtom,WebChanges,WebCreateNewTopic,WebIndex,WebLeftBar,WebNotify,WebPreferences,WebRss,WebSearch,WebSearchAdvanced,WebStatistics,WebTopicList
Note: I built the above as the list of all default topics in the
data/_default web, except WebHome since it is typically modified by users to include actual contents. Adapt to your case.
Then, in your %SEARCH expressions, use the parameter
excludetopic="%SYSTEMTOPICS%"
Variant: you may want to make the definition be:
- Set SYSTEMTOPICS = %WEBSYSTEMTOPICS%,WebAtom,WebChanges,WebCreateNewTopic,WebIndex,WebLeftBar,WebNotify,WebPreferences,WebRss,WebSearch,WebSearchAdvanced,WebStatistics,WebTopicList
- Set WEBSYSTEMTOPICS =
This way, you can add web-specific topics to the excluded list by defining WEBSYSTEMTOPICS locally in webs.
--
ColasNahaboo - 25 Sep 2008
That's a good trick!
Here are some more options:
HowToEditWebTopicList
--
SeanCMorgan - 25 Sep 2008
Thank you, this works very well!
--
EichelhardtAnne - 26 Sep 2008