[pmwiki-users] FmtPageList undefined

Hans design5 at softflow.co.uk
Tue Jul 21 02:26:19 CDT 2009

Tuesday, July 21, 2009, 12:26:48 AM, adam overton wrote:

>  # i've tried loading both pagelist.php and stdconfig.php
> beforehand (one and then the other)
>  //include_once('scripts/pagelist.php');
>  include_once('scripts/stdconfig.php');

>  $argsx = "group=Test";
>  $optx = array('o' => $argsx, 'fmt' => 'csv');
>  $pagelistTest = FmtPageList('$MatchList', $pagename, $optx, 0);
>  # or using the PowerTools pagelist function:
>  //$pagelistTest = MxPageList($pagename, "group=Test");
>  echo $pagelistTest;

> this all at the very very bottom of config.php beneath everything as suggested.
> and, something like the following still works fine, running at the same time:
>  $FmtPV['$blamtest'] = 'MxPageList($pn, "group=Test")'; # works
> perfect, show a csv-list of pages in the group 'Test'

Adam, i am puzzled to understand what you are trying to achieve.
To put the code above in config.php makes no sense to me.

Regards powertools.php functions: they are designed to work with the
powertools markup expressions, and those markup expressions use the
standard PmWiki approach for creating new expressions, and of course
the standard syntax in a page.

Above you seem to be trying to create a formatted pagelist output
using a page variable. I would think this could be problematic, and
using a markup expression would be better.

Regards the powertools markup expression (MX) {(pagelist ...)}:
The output format is limited, and one cannot use fmt= options in the
expression. Specifically it was not designed to use pagelist
templates, as i did not know how to do that. Any modifications to the
code needs to be done in the helper function FPLSimpleText.

But without knowing what you try to achieve it is not possible to
give any hints on this.


More information about the pmwiki-users mailing list