[pmwiki-users] pagelist sort by date not time

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 27 07:35:05 CDT 2006


On Wed, Sep 27, 2006 at 05:03:27PM +1000, Kathryn Andersen wrote:
> On Wed, Sep 27, 2006 at 01:16:58AM -0500, Patrick R. Michaud wrote:
> > In 2.2.0-beta5, one can define a custom page variable for date
> > and then sort based on that:
> > 
> >     $FmtPV['$Date'] = 'strftime("%Y-%m-%d", $page["time"])';
> > 
> >     order=-$Date,group,name
> > 
> > See, for example, http://www.pmwiki.org/wiki/Test/RecentChangesByDate .
> 
> Fantastic!  So it does it for $Var variables as well as $:Var variables,
> does it?  Cool.

Yes, it turned out to be easy to have it work for both.

Pm




More information about the pmwiki-users mailing list