[pmwiki-users] Pagelists of multiple linkbacks

Hans design5 at softflow.co.uk
Sun Aug 10 16:15:12 CDT 2008

Saturday, August 9, 2008, 8:16:33 PM, Patrick R. Michaud wrote:

> This is a planned feature but it doesn't exist yet.  On 
> http://www.pmwiki.org/wiki/PmWiki/RoadMap it's given as
> "Allow link= option to do wildcards".

This will be a great addition to pagelist!

Meanwhile you can try this solution based on markup expressions:
you need Cookbook.PowerTools installed, plus the markup expression
given below added to config (or powertools.php),
then create an expression like this in your page:

{(unilist (pagelist link=Category.Personal) (pagelist link=Category.Professional) )}

# return united pagelist formatted as simple list
# from csv-pagelists supplied as arguments
$MarkupExpr['unilist'] = 'MXUniList($pagename, $args, $argp)';
function MXUniList($pagename, $args) {
        $a = array();
        foreach($args as $v) {
                $vv = explode(',',$v);
                $a = array_merge($a, $vv);
        $a = array_unique($a);
        //make list of pagename links
        foreach($a as $k => $p)
                $a[$k] = '* [['.$p.']]';
        return implode("\n",$a);

The unilist expression markup takes comma-separated lists of pagenames as
arguments, and outputs a simple pagelist of links, with any duplicate
pagenames dropped, and the names sorted.


More information about the pmwiki-users mailing list