Question
I'm running TWiki20030201. My first stab at a web site is up here:
http://www.ku.edu/cgiwrap/kups/twiki/view
In that site, I have a TWiki Web called "Announcements", and what I want is for the Main.WebHome to have a short summart of the 5 most recent announcements. Now, in Announcements, I figure I need to create a Form so that the announcemnets have structured information, but I did not do that yet because I want to see that SEARCH works. I'm following several recipes I find in your Support site and I fear that they were written for a previous version of TWiki.
I want some nice looking, brief list of announcement titles with links to their full report. I've never used SEARCH{} before.
In my site above, I use this syntax for the SEARCH (I'm leaving off the percent signs because I can't figure how to stop this command from being interpreted by TWiki:
%SEARCH{".*" web="Announcements" scope="topic" reverse="on" order="date" limit="5" regex="on" nosummary="on" nototal="on" header="" format="|[[$topic]]| $text |" }%
I believe this should find the 5 most recent things in Announcements and show them.
However, in the output, which you see on my page, you see it is only finding Main Web's
WebIndex document. It is not finding any Announcements. Further, it has the words "Search: Index" in the output, I don't know where those came from.
I'm going to go ahead and work on the web form for my Announcements Web, and I hope somebody will clue me in on SEARCH in the meanwhile. If I get the form going with a field "Short Summary" then perhaps I can SEARCH and display the Short Summary from the field.
--
PaulJohnson - 19 Jun 2003
Answer
Try this:
(use the verbatim tag to stop twiki from interpolating variables)
---+++ Recent Announcements
%SEARCH{".*" web="Announcements" regex="on" nosearch="on" order="modified" reverse="on" nototal="on" limit="5" format="<dt>Announcements.$topic $date <dd>$summary <dd> " }%
<dl>}%
This question really should be asked in the Support web; the topic will probably be moved there shortly by someone in the Admin group.
--
MattWilkie - 19 Jun 2003