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 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.

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 History Action Size Date Who Comment
PNGpng sorted-search-mod.png r2 r1 manage 19.4 K 2007-07-17 - 11:18 UnknownUser Screen shot of search result
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-07-17 - MartinKaufmann
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.