Tags:
create new tag
, view all tags

Question

When a user clicks on the Index (which takes them to WebTopicList, which is

%INCLUDE{"%TWIKIWEB%.%TOPIC%"}% 
), they see a lot a irrelevant topics. How do I make this page reflect just the user generated content and not the other default pages (like UserViewTemplate , TWikiGroupTemplate , PatternSkinUserViewTemplate and such). The WebTopicList page is too verbose and cluttered to make it meaningful for the first time user or visitor.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Ubuntu
Web server: Apache
Perl version:  
Client OS:  
Web Browser:  
Categories: Installation, Permissions, Localisation

-- KarthikB - 06 Aug 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

The WebTopicList topic in every web simply includes the content (and thus the functions) of TWiki.WebTopicList; and basically, it is a %SEARCH{...}%. You can simply replace the %INCLUDE{...}% by the contents of TWiki.WebTopicList and then adjust the search.

As a first shot, try the following search, which simply excludes topics beginning with Web or ending in Template:

%SEARCH{"\.*" scope="topic" type="regex" nosearch="on" excludetopic="Web*,*Template"}%

-- HaraldJoerg - 06 Aug 2008

Of course then if someone happened to use a name matching Web* or *Template, it wouldn't appear in the index. Better to exclude topics based on the name of original author (see my answer to SearchMethodToUse), or creation date.

But instead of permanently hiding topics, I prefer to use the TreePlugin to create a more organized and indented index. The hierarchicy is based on the parent relationships, but a lot of those utility pages are "orphaned" which makes them appear at the top level: you need to assign a parent ("adopt" them smile ) at the location you want them to appear [we, the community, should fix that].

Then for bonus points, with TreeBrowserPlugin you can display the hierarchy so it almost looks like Windows File Explorer. The utilities can be buried in a folder (which I have expanded in the screenshot shown at the right).

Here's what I did:

  1. Install TreePlugin [with version 1.6, apply a critical code fix. See my remarks of 03 Jun 2008 at TreePluginDev]
  2. Install TreeBrowserPlugin
  3. Change your TWiki.WebTopicList as below.
  4. Change WebTopicList in every other web to: %INCLUDE{"%SYSTEMWEB%.%TOPIC%"}%
  5. Re-parent pages as you see fit. To do that in bulk, you might use GlobalReplacePlugin, but I just edited the raw text of topics at the file system level.

Content of your new TWiki.WebTopicList: Show Hide

<!--
ORIGINAL VERSION:
% TOPICLIST{"   * [[% BASEWEB%.$name][$name]]"}%
% MAKETEXT{"See also the verbose [_1]." args="[[% BASEWEB%.WebIndex][WebIndex]]"}%
-->


---+!! %BASEWEB% Web Topic List

---++ Topics by Hierarchical Relationship
<a href="javascript: tree.openAll();">open all</a> | <a href="javascript: tree.closeAll();">close all</a>
%TREEBROWSER{
   theme="file"
   shared="tree"
   title=""
   openTo="1"
   noroot="true"
}%
%TREE{
   web="%BASEWEB%"
   formatting="outline"
   format="   * [[$web.$topic][$topic]]"
   levelprefix="   "
}%

%GRAY% Note: underlining indicates items that appear in your browser history.%ENDCOLOR%

---++ Other Index Listings for this Web
Alphabetical list of all topics: %TWISTY{firststart="hide" showlink="Show" hidelink="Hide"
showimgleft="%ICONURLPATH{toggleopen-small}%"
hideimgleft="%ICONURLPATH{toggleclose-small}%"}%

%TOPICLIST{"   * [[%BASEWEB%.$name][$name]]"}%

%ENDTWISTY%

%MAKETEXT{"The verbose [_1]." args="[[%BASEWEB%.WebIndex][WebIndex]]"}%

-- SeanCMorgan - 07 Aug 2008

Addendum: if you want to just leave out the orphaned pages, specify the tree's root topic in TreePlugin with topic=WebHome

-- SeanCMorgan - 08 Aug 2008

Thanks. That solved the problem. The Wiki page looks clean now.

-- KarthikB - 14 Aug 2008

The original question was solved, but I got ambitious and tried to make a list of all update topics on the main page. The following code works well:

%SEARCH{ "\.*" regex="on" web="Main, PhantomDataSets, SimulationDataSets" nosearch="on" nototal="on" order="modified" reverse="on" excludetopic="Web*,*LeftBar" header="| *New*  | *Who*  | *Last update*  |" format="| [[$web.$topic][$topic]]  | $wikiusername  | $date  |" limit="15" }%
but the problem is the topics from the other list are not linked. How do I solve it? Thanks. See screenshot (search.jpg) attached.

-- KarthikB - 10 Sep 2008

In case you didn't see it, FranzJosefGigler fixed your search by changing [[$topic]] into [[$web.$topic][$topic]]

-- SeanCMorgan - 12 Sep 2008

 
Change status to:
Topic attachments
I Attachment Action Size Date Who Comment
JPEGjpg search.jpg manage 10.1 K 2008-09-10 - 18:31 KarthikB  
GIFgif tree.gif manage 5.9 K 2008-08-07 - 16:04 SeanCMorgan  
Topic revision: r12 - 2008-09-26 - SeanCMorgan
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.