[pmwiki-users] Question on "categories"

DaveG pmwiki at solidgone.com
Sun May 23 10:30:39 CDT 2010

On 5/23/2010 10:56 AM, Francesco Sblendorio wrote:
> Hi,
> I'm making pages with the purpose to catalog various conferences. Every
> conference has one or more topic. So I tagged the pages describing the
> conference with [[!argument]] tag. That's Ok, also using listcategoris
> recipes here:
> http://www.cicap.org/lombardia/wiki/pmwiki.php/Main/PortfolioConferenze
> My problem is that when I click on one topic, I have this page:
> http://www.cicap.org/lombardia/wiki/pmwiki.php/Category/ParanormaleReligioso
> What I would like is:
> - make "Main" group disappear
Well according to the documentation page Cookbook/ListCategories, you 
specify which groups to exclude from config.php:

   SDV($ListCategories_ExcludeCategories, "/^Main$/");

> - display titles of pages instead of their "physical" name, which is,
> for definition, a symbolic one and not the true title of the page which
> can contain hyphens, quotes and so on
Again, the docs say that you need to create a display function. In this 
case that might look like this (note the "+" in the anchor link, which 
will expand the pagename to the spaced title) -- I have not tested this, 
but it should help put you in the right direction:

  $ListCategories_MarkupFunctions["fullname"] = YourLayoutFunction;
function YourLayoutFunction( $categories ) {
   // sort
   global $ListCategories_SortSimpleList;
   if( $ListCategories_SortSimpleList ) ksort( $categories );

   // output
   $out = "";
   $space = "";
   foreach( $categories as $pn => $count ) {
     $out .= $space . "[[!$pn | +]]";
     $space = " ";
   return PRR($out);

  ~ ~ Dave

More information about the pmwiki-users mailing list