Notes /

Adding CSS classes to group header navigation links in PmWiki

 

Introduction

This solution was originally suggested by PmWiki users Pjv (blog) and Dfaure on pmwiki.org/wiki/PITS/00985 and improved to also add the group related class names.

Use as a Cookbook

  1. Download linkpagegroup.zip and extract the only file.
  2. Add the following to your config.php:
    include_once("$FarmD/cookbook/linkpagegroup.php"); [@ 
    $LinkFunctions['<:page>'] = 'LinkPageGroup'; 
  3. Optionaly customize the class names you want by adding additional configuration to your config.php:
    $LinkPageSelfFmt = '<a class=\'selflink grouplink\' href=\'$LinkUrl\'>$LinkText</a>';
    $LinkGroupFmt = '<a class=\'wikilink grouplink\' href=\'$LinkUrl\'>$LinkText</a>';
    $LinkGroupParentFmt = '<a class=\'wikilink groupparentindex grouplink\' href=\'$LinkUrl\'>$LinkText</a>'; 

Examples

Browse this website to see how the technique is used in Group headers for navigation.