[pmwiki-users] pagelist questions

John Rankin john.rankin at affinity.co.nz
Mon Jul 18 20:14:36 CDT 2005


On Tuesday, 19 July 2005 11:55 AM, Bronwyn Boltwood <arndis at gmail.com> wrote:
>Hi,
>
>I'd like to emit a pagelist in a format like this, for use in a
>sidebar:
>
>!Group
>* Page 1
>* Page 2
>* Page 3

Try this in your config.php file:
        $FPLByGroupStartFmt = "<div class='fplbygroup'><ul>";

        $FPLByGroupGFmt = "</ul><h1><a href='\$ScriptUrl/\$Group'>\$Group</a></h1><ul>";

        $FPLByGroupIFmt = "<li><a href='\$PageUrl'>\$Title</a></li>";

        $FPLByGroupEndFmt = "</ul></div>";

There may be a way to avoid the empty <ul></ul> that this creates at the beginning, but I can't think of one.

>
>I'd also like to:
>
>- list pages in several *specified* groups (more than one, but not
>everything or all-but-foo)

  you might need several pagelist directives

>- remove the trailing / from group names

  see above; to put it back, use
       $FPLByGroupGFmt = "</ul><h1><a href='\$ScriptUrl/\$Group'>\$Group</a> /</h1><ul>";

>- have a "short" format that gives just the pagenames, without listing
>the group at all

  see above; to display the name instead of the title, use
        $FPLByGroupIFmt = "<li><a href='\$PageUrl'>\$Name</a></li>";

  there is a fmt=simple option that creates a bullet list of names, including the group
  you can omit the group with
        $FPLSimpleIFmt = "<li><a href='\$PageUrl'>\$Name</a></li>";


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list