[pmwiki-users] Grouping in pagelists
John Rankin
john.rankin at affinity.co.nz
Thu Oct 23 19:46:32 CDT 2014
On 24/10/14 7:22 AM, Simon wrote:
> Thanks John and Petko.
>
> Both solutions work.
From memory, Petko's solution didn't work in my case.
$FmtPV['$FirstLetter'] = 'substr($FmtPV["$FirstLine"], 0, 1)';
didn't set the first letter. I think $name is one of a few special cases.
JR
> Looking generally is there any possibility of making markup
> expressions work inside a pagelist, or is the evaluation order too
> difficult?
>
> regards
>
>
>
> On 24 October 2014 03:34, Petko Yotov <5ko at 5ko.fr <mailto:5ko at 5ko.fr>>
> wrote:
>
> You can define in config.php a PageVariable containing the first 4
> characters of the name:
>
> $FmtPV['$Name4'] = 'substr($name, 0, 4)';
>
> then use that variable in the pagelist template:
>
> (:template first {=$Name4}:)
>
> I've enabled it on the Test page you created.
>
> Petko
>
> On 23.10.2014 09:49, Simon wrote:
>
> Lets say I have a lot of pages in the format
> yyyy-mm-dd-description.
>
> I want to group then by year.
>
> Can anyone suggest a way of making
>
> (:template first {(substr {=$Name} 0 4)}:)
>
> work?
>
> See http://www.pmwiki.org/wiki/Test/PageListGrouping or an
> attempt
>
>
> _
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20141024/a05e6db2/attachment.html>
More information about the pmwiki-users
mailing list