Using the TWiki formatted search for page aggregation.
%<nop>SEARCH{"^MyPage.*"
web="Random"
scope="topic"
regex="on"
nosearch="on"
order="topic"
reverse="on"
nototal="on"
limit="5"
format="$text"}%
So in this example, you might have pages named MyPageYYYYMMDD, for example MyPage20120524. Then the search would select the most recent 5 such pages, based on page title, and display them.
To show the topics in order of their modification date, use order="modified" rather than
order="topic" .
One note: the TWiki release of Dec 2001 and before do not support the format=$text option. To add the feature, modify Search.pm at around line 570 as follows:
} elsif( $theFormat ) {
# free format, added PTh 10 Oct 2001
if( ! $text ) {
( $meta, $text ) = &TWiki::Store::readTopic( $thisWebName, $topic );
}
$tempVal =~ s/\$summary/&TWiki::makeTopicSummary( $text, $topic, $thisWebName )/geos;
$tempVal =~ s/\$formfield\(\s*([^\)]*)\s*\)/getMetaFormField( $meta, $1 )/geos;
$tempVal =~ s/\$pattern\(\s*(.*?\s*\.\*)\)/getTextPattern( $text, $1 )/geos;
#
# add the following line to get $text format to work
$tempVal =~ s/\$text/$text/geos;
} elsif( $noSummary ) {
The next step is to provide an easy way to create and edit the little pages. Again, Paul:Journal/LinksHome has a very nice way. You create a form with a button. The form action is to edit the page that corresponds to today's date. The SERVERTIME variable has just the right features for this. Here's an example:
<form name="new" action="% SCRIPTURLPATH%/edit% SCRIPTSUFFIX%/% WEB%/">
<input type="hidden" name="topic" size="40" value="MyPage% SERVERTIME{$year$mo$day}%" />
<input type="hidden" name="onlywikiname" value="on" />
<input type="hidden" name="topicparent" value="TWikiSearchTricks" />
<input type="submit" value=" Create/Edit Todays Entry " class="submitButton" />
</form>
In this example I inserted a space between the percent-sign and the following variable, to prevent variable expansion - if you copy/paste this, you'll need to get rid of the spaces.
You can accomplish the same result by hyperlinks, as in:
[[% SCRIPTURLPATH%/edit% SCRIPTSUFFIX%/% WEB%/MyPage% SERVERTIME{$year$mo$day}%][edit]]
-- DaleBrayden - 26 Aug 2003