[pmwiki-users] sections and pagelist

Petko Yotov 5ko at 5ko.fr
Sat Sep 3 10:17:26 CDT 2011

On Saturday 03 September 2011 04:47:41, Carlos AB wrote :
> I'm trying to understand how sections work when using pagelist option
> "fmt=".
> (:pagelist group={=$Group} wrap=inline
> fmt=BlikiTemplates#blikicommentcount#blikicommentcountend
> name={(BlikiNoSuffix {=$Name})}-*-BlikiComment :)
> I want to know is how that section is extracted and delivered to
> pagelist and what parts of the code handle it, including the "ruleset
> walk".

The Pagelist "template" is extracted with the function RetrieveAuthSection(), 
that means only visitors with read permissions on the templte page can use it.

The code that handles it is mostly in the file scripts/pagelists.php. The 
functions loading and formatting the template are in the $FPLTemplateFunctions 
array and are called by FPLTemplate(). First, the specific markup for the 
pagelist item is processed -- that is PagelistVariables like {$$GroupCount} 
and {=$:Summary} -- then the resulting wiki markup is added to the general 
output that will be returned by FmtPageList(). After FmtPageList() returns its 
output, all markup rules are restarted from the beginning, which is caused by 
a call to PRR(). 

You can see the order of the markup processing ruleset if you call on your 
wiki the address index.php?action=ruleset ; add to config.php $EnableDiag=1; 
for it to work.

In your example, it looks like you have a nested pagelist inside another 
pagelist. In some cases it will work, but you should carefully use 
PagelistVariables like {$$GroupCount} and {=$:Summary} because they may be 
processed in the outer pagelist, earlier than what you intend.


More information about the pmwiki-users mailing list