<div dir="ltr">Thanks John and Petko.<div><br></div><div>Both solutions work. </div><div>Looking generally is there any possibility of making markup expressions work inside a pagelist, or is the evaluation order too difficult?</div><div><br></div><div>regards</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 October 2014 03:34, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can define in config.php a PageVariable containing the first 4 characters of the name:<br>
<br>
  $FmtPV['$Name4'] = 'substr($name, 0, 4)';<br>
<br>
then use that variable in the pagelist template:<br>
<br>
  (:template first {=$Name4}:)<br>
<br>
I've enabled it on the Test page you created.<br>
<br>
Petko<span class=""><br>
<br>
On 23.10.2014 09:49, Simon wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Lets say I have a lot of pages in the format yyyy-mm-dd-description.<br>
<br>
I want to group then by year.<br>
<br>
Can anyone suggest a way of making<br>
<br>
(:template first {(substr {=$Name} 0 4)}:)<br>
<br>
work?<br>
<br></span>
See <a href="http://www.pmwiki.org/wiki/Test/PageListGrouping" target="_blank">http://www.pmwiki.org/wiki/<u></u>Test/PageListGrouping</a> or an<br>
attempt<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a>
</div>