Tags:
create new tag
, view all tags

Question

I use the following code to generate a list of all recently changed topics (with TablePlugin installed).

%TABLE{sort="on" initsort="3" initdirection="up" databgsorted="#ffffff,#edf4f9" }%
%SEARCH{".*" web="all, -TWiki, -Main, -Sandbox, -Trash" type="regex" nonoise="on" excludetopic="Web*" date="P1w/$today" format="| $web.$topic | $web | $date | $percntCALC{$IF($rev > 1, r$rev, $percntN$percnt)}$percnt | $wikiusername |" }%

The resulting list is sorted by date (reverse) except for the first item which is always out of order as shown on the screen shot.

sorted-search-mod.png

What could be the reason for this behaviour? Thanks for your help!

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, TablePlugin, InterwikiPlugin
Server OS: Debian Etch 2.6.18-4-486
Web server: Apache 2.2.3
Perl version: 5.8.8
Client OS: Windows XP
Web Browser: Firefox 2 & IE 6
Categories: Search

-- MartinKaufmann - 17 Jul 2007

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.

try the following:

%TABLE{sort="on" initsort="3" initdirection="up" headerrows="1" databgsorted="#ffffff,#edf4f9" }%
| *topic* | *web* | *date* | *rev* | *wikiusername* |
%SEARCH{".*" web="all, -TWiki, -Main, -Sandbox, -Trash" type="regex" nonoise="on" excludetopic="Web*" date="P1w/$today" format="| $web.$topic | $web | $date | $percntCALC{$IF($rev > 1, r$rev, $percntN$percnt)}$percnt | $wikiusername |" }%

I added a headerrow and set the parameter headerrows to "1"

-- CarloSchulz - 17 Jul 2007

Thanks! That seems to do the trick. I also tried headerrows="0" without adding a header row - without success. Why doesn't that work as expected? I would prefer not having to include a header but I can live with your solution. Thanks again for you help.

-- MartinKaufmann - 17 Jul 2007

 
Change status to:

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng sorted-search-mod.png manage 19.4 K 2007-07-17 - 11:18 MartinKaufmann Screen shot of search result
Topic revision: r3 - 2007-07-17 - MartinKaufmann
 
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.