[pmwiki-users] custom pagelist

david at ellendee.co.uk david at ellendee.co.uk
Sat Apr 28 12:19:11 CDT 2007


A little while ago, I sent a question to the list asking how to sort a list
of pages (titles of books) ordering them by their title without the leading
'A' or 'The'.

Hagan Fox and J Meijer together gave me an answer adding the below code to
the config file.

I thought I'd got it fixed. I went away and came back this morning only to
find that my pagelist markup is ignoring the code. Anyone tell me what I'm
doing wrong?

Original answers:

  # use {$FullTitle} in page;list templates etc
$FmtPV['$FullTitle'] = $FmtPV['$Title']; 
  # {$Title} is now for exclusive use in pagelist, leading A & The stripped
$FmtPV['$Title'] = "preg_replace('/^(A|The) /','',".$FmtPV['$Title'].")";

What it does is substitute {$Title} with a version that strips leading A &
The. Pagelists will use this value and therefore sort correctly. 
The original {$Title} is still available as {$FullTitle}. Use this in
pagelist templates and page text.
 


--------------------------------------------------------------------
mail2web.com – What can On Demand Business Solutions do for you?
http://link.mail2web.com/Business/SharePoint





More information about the pmwiki-users mailing list