<div dir="ltr">Thank you.<div>Indeed the page text variable calculation which includes a markup expression does not embed in the pagelist.</div><div><br></div><div>Appreciate your very quick reply.</div><div><br></div><div>Now fixed, [<a href="http://ttc.org.nz/pmwiki/pmwiki.php/Webteam/2012March">1</a>].</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>____<br><a href="http://kiwiwiki.nz" target="_blank"><font size="1">http://kiwiwiki.nz</font></a></div></div></div></div>
<br><div class="gmail_quote">On 17 July 2016 at 20:39, 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">A misunderstanding about PageTextVariables comes up often.<br>
<br>
The reality is that the value is always the text that is written in the page. It is only evaluated when the variable is printed/output to HTML. So when you want to sort by that variable, all values in all pages are the not-yet-evaluated text strings, and the order function does what it can with them. It does not process/evaluate the text at this point.<br>
<br>
With your page names, it will be simpler to use a PageVariable, not a PageTextVariable:<br>
<br>
  $FmtPV['$NameToYearMonth'] = 'strftime("%Y%m", strtotime($name))';<br>
<br>
Then use (:pagelist order=$NameToYearMonth:)<br>
<br>
<br>
If this is not possible, writing in the wiki page:<br>
  (:MonthNum:07:)<br>
<br>
might be easier for some than:<span class=""><br>
  (:MonthNum:{(ftime fmt=%m when="{$Namespaced}")}:)<br>
<br></span>
and this would work for ordering.<br>
<br>
Petko<br>
<br>
---<br>
Change log     :  <a href="http://www.pmwiki.org/wiki/PmWiki/ChangeLog" rel="noreferrer" target="_blank">http://www.pmwiki.org/wiki/PmWiki/ChangeLog</a><br>
Release notes  :  <a href="http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes" rel="noreferrer" target="_blank">http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes</a><br>
If you upgrade :  <a href="http://www.pmwiki.org/wiki/PmWiki/Upgrades" rel="noreferrer" target="_blank">http://www.pmwiki.org/wiki/PmWiki/Upgrades</a><br>
<br>
<br>
On 2016-07-17 09:31, Simon wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In a page[1 <<a href="http://ttc.org.nz/pmwiki/pmwiki.php/FixtureCard/2016April" rel="noreferrer" target="_blank">http://ttc.org.nz/pmwiki/pmwiki.php/FixtureCard/2016April</a>>] I<span class=""><br>
declare the page text variables<br>
<br>
(:Year:{(substr {$Name} 0 4)}:)<br>
(:MonthNum:{(ftime fmt=%m when="{$Namespaced}")}:)<br>
<br>
Note the page name is in the format yyyymonth. e.g "2016 April"<br>
<br>
<br>
I create a pagelist[2<br></span>
<<a href="http://ttc.org.nz/pmwiki/pmwiki.php/FixtureCard/GroupHeader" rel="noreferrer" target="_blank">http://ttc.org.nz/pmwiki/pmwiki.php/FixtureCard/GroupHeader</a>>][3<br>
<<a href="http://ttc.org.nz/pmwiki/pmwiki.php/Site/LocalTemplates" rel="noreferrer" target="_blank">http://ttc.org.nz/pmwiki/pmwiki.php/Site/LocalTemplates</a>>] with an order<span class=""><br>
based on the page text variables<br>
(:pagelist group=FixtureCard name=2*,-*Half*,-*ClubNight* fmt=#grouptrail<br>
order=$:Year,$:MonthNum :)<br>
<br>
I'm not getting the order I expect from the pagelist.<br>
<br>
If anyone can suggest where I could look to get this to work I'd appreciate<br>
it<br>
</span></blockquote>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</blockquote></div><br></div>