[pmwiki-users] Pagelist ordering by name
Peter Bowers
pbowers at pobox.com
Tue Oct 13 02:11:13 CDT 2009
Better solution to each:
SORTING WITHOUT A/AN/THE:
$FmtPV['$TitleNoArticle'] = 'preg_replace("/^ *(?:The|An?) /i", "",
(@$page["title"] ? : $AsSpacedFunction($name)), 1)';
(:pagelist ... order=$TitleNoArticle ...:)
SORTING WITH LAST NAME FIRST:
$FmtPV['$TitleLastFirst'] =
'preg_replace("/^(.*?)([A-Z][a-z0-9_]*)$/", "\\\\2, \\\\1",
(@$page["title"] ? $page["title"] : $AsSpacedFunction($name)))';
(:pagelist ... order=$TitleLastFirst ...:)
Note again that the 2 $FmtPV assignments are exactly 1 line each -- if
they are reformatted by your email then you will need to pull them
back together.
-Peter
More information about the pmwiki-users
mailing list