<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 24/10/14 7:22 AM, Simon wrote:<br>
    </div>
    <blockquote
cite="mid:CAFUSNWM4GFL8COi8XoFrkU5StZjt4sVThtbzfmbNTDP9gFFYSg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks John and Petko.
        <div><br>
        </div>
        <div>Both solutions work. <br>
        </div>
      </div>
    </blockquote>
    From memory, Petko's solution didn't work in my case.<br>
    <br>
    $FmtPV['$FirstLetter'] = 'substr($FmtPV["$FirstLine"], 0, 1)';<br>
    <br>
    didn't set the first letter. I think $name is one of a few special
    cases.<br>
    <br>
    JR<br>
    <blockquote
cite="mid:CAFUSNWM4GFL8COi8XoFrkU5StZjt4sVThtbzfmbNTDP9gFFYSg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <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 moz-do-not-send="true"
              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 moz-do-not-send="true"
                href="http://www.pmwiki.org/wiki/Test/PageListGrouping"
                target="_blank">http://www.pmwiki.org/wiki/Test/PageListGrouping</a>
              or an<br>
              attempt<br>
            </blockquote>
            <div class="HOEnZb">
              <div class="h5">
                <br>
                _</div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>