SelfReferences

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Question

How can I control how a page refers to itself, as in "SelfReferences"?

Answer 1: Disabling self-references entirely

You can prevent a page from creating links to itself by selectively disabling its WikiWord. Simply add the following lines to your local/config.php file:

    $title = FmtPageName('$Title',$pagename);
    $WikiWordCount[$title] = 0;

Answer 2: Changing the text of a self-reference

You can also completely customize the way in which a self-reference will be displayed via the $WikiWordReplaceFmt array. For example, adding

    $title = FmtPageName('$Title',$pagename);
    $WikiWordReplaceFmt[$title] = "<b class='selfref'>$title</b>";

to local/config.php will cause any occurrences of the page's title to be displayed in bold (and not linked).

See also

  • PmWiki.LinkVariables

pmwiki-2.2.120 -- Last modified by {{Pm}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons