[pmwiki-users] Cleaning local config - Category enabling

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 1 09:27:48 CST 2006


On Wed, Nov 01, 2006 at 12:14:09AM +0100, Jiri wrote:
> A long time ago it was necessary to add into the local config
> the following:
> 
> # Category enabling
> SDV($CategoryGroup,'Category');
> Markup('[[!','<links','/\[\[!([^\|\]] ?)\]\]/',
>    "<span class='category'>[[$CategoryGroup/$1]]</span>");
> 
> Is it still necessary in v.2.2.0-beta15 ?

If you want to have <span class='category'>...</span> around the
link, then you'll need something like this.  Currently the category
link markup generates:

    <a class='categorylink' href='...'>Link text</a>

so one can style the links using the CSS categorylink class.

However, if the <span> is still needed for some reason,
then it can be added using the $LinkCategoryFmt variable, thus:

    $LinkCategoryFmt = "<span class='category'><a
      class='categorylink' href='\$LinkUrl'>\$LinkText</a></span>";

> And this ?
> $AutoCreate['/^Category\\./'] = array('ctime' => $Now);

You only need this line if you want Category pages to be
automatically created whenever someone saves a page with
a category link.

Pm




More information about the pmwiki-users mailing list