[pmwiki-users] pagelist sort by date not time
Henrik Bechmann
henrik.bechmann at sympatico.ca
Wed Sep 27 08:07:33 CDT 2006
Thanks Patrick, that's outstanding.
I think that daily granularity is far more useful to readers (of a site
map) than minute by minute granularity.
Best,
- Henrik
Patrick R. Michaud wrote:
> On Wed, Sep 27, 2006 at 01:54:08AM -0400, Henrik Bechmann wrote:
>
>> All,
>>
>> I want to sort some pagelist output by
>>
>> order=-time,group,name
>>
>> but only by date (not taking into account the time of day).
>>
>> The logical equivalent would be:
>>
>> order=-date,group,name
>>
>> How would I do this?
>>
>
> There's not an easy way to do it in 2.1.x.
>
> 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 .
>
> Pm
>
>
--
Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca
More information about the pmwiki-users
mailing list