[pmwiki-users] Pagelist sorting by by page text variables

michael paulukonis xraysmalevich at gmail.com
Thu Jun 27 10:55:01 CDT 2013


I've added some of this to the wiki under
http://www.pmwiki.org/wiki/PmWiki/PageLists#pagetextvariable

Edit as needed.

-Michael Paulukonis
http://www.xradiograph.com
<http://goog_2112721603>Interference Patterns (a
blog)<http://www.xradiograph.com%5Cinterference>
@XraysMonaLisa <https://twitter.com/XraysMonaLisa>
http://michaelpaulukonis.com
<http://www.BestAndroidResources.com>

Sent from somewhere in the Cloud
(hearthrug, by the fender)


On Thu, Jun 27, 2013 at 10:21 AM, Peter Bowers <pbowers at pobox.com> wrote:

> On Thu, Jun 27, 2013 at 6:18 AM, Simon <nzskiwi at gmail.com> wrote:
>
>> I'm having trouble understanding why a pagelist I have written won't come
>> out in order by page text variable
>> order=-$:MonthNum
>> >
>> >
>>
> You've defined your PTV using a markup expression as below:
>
> (:MonthNum:{(ftime fmt="%m" when=(substr {$Name} 4))}:)
>
> pagelist does not evaluate markup expressions when working with PTVs and
> neither are the PTV values cached anywhere. Therefore pagelist is sorting
> the literal values of open-curly-brace followed by open-paren followed by
> the 5 characters "f-t-i-m-e" etc.  Since these literal values are identical
> across all your pages you end up with what appears to be random ordering.
>
> Probably the best way for you to fix this is by hardcoding the $:MonthNum
> in your page-creation template (allowing some flexibility in page naming
> later on) or by defining a PV which does the conversion from the pagename
> to the monthnum.  There are undoubtedly other solutions, but those are the
> first 2 that come to mind...
>
> -Peter
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130627/318ccc27/attachment.html>


More information about the pmwiki-users mailing list