[pmwiki-users] using page full text in $FmtPV function

John Rankin john.rankin at affinity.co.nz
Mon Sep 22 20:41:14 CDT 2014

When defining a page variable using
     $FmtPV['$FirstLine'] = 'VerseFirstLine( ... )';
is it possible to pass the page's full text as a parameter?

Using pmwiki to publish a book of poetry, we have a need to generate an 
index of first lines. I am currently doing this using
     $FmtPV['$FirstLine'] = 'VerseFirstLine("$group.$name")';
then calling RetrieveAuthPage in the VerseFirstLine function. The 
function detects the start of a verse on the page and returns its first 
line. If there is no poem markup on the page, it returns an empty 
string. I then use a custom (:pagelist:) to generates a list sorted by 
$FirstLine of
     -< [[$FullName |$FirstLine]]

Do I need to call RetrieveAuthPage or is there a way to tell $FmtPV to 
use the page text?


John Rankin

More information about the pmwiki-users mailing list