PmWiki: LinkVariables

<< LayoutVariables | Variables | EditVariables >>

The variables on this page control the formatting of links within wiki pages, such as WikiWords and URL-links. The settings of these variables should be performed in LocalCustomizations.

$WikiWordCountMax
The maximum number of times to convert each WikiWord encountered on a page. Defaults to 1,000,000. Common settings for this variable are zero (disable WikiWord links) and one (convert only the first occurrence of each WikiWord).
        $WikiWordCountMax = 0;     # disable WikiWord links
        $WikiWordCountMax = 1;     # convert only first WikiWord

$WikiWordCount
An array that allows the number of WikiWord conversions to be set on a per-WikiWord basis. The default is to use $WikiWordCountMax unless a value is set in this array. By default PmWiki sets $WikiWordCount['PmWiki']=1 to limit the number of conversions of "PmWiki".
        $WikiWordCount['PhD']=0;     # Don't convert "PhD"
        $WikiWordCount['WikiWord']=5;  # Convert WikiWord 5 times
        # the following lines keep a page from linking to itself
        $title = FmtPageName('$Title_',$pagename);
        $WikiWordCount[$title]=0;    

$WikiPageExistsFmt
The (HTML) string to output for links to already existing wiki pages. Defaults to
        <a class='wikilink' href='$PageUrl$Fragment'>$LinkText</a>

$WikiPageCreateFmt
The (HTML) string to output for links to non-existent wiki pages. The default is to add a '?' after the link text with a link to the page edit/create form. Defaults to
        <span class='createlink'>$LinkText</span><a 
            class='createlink' href='$PageUrl?action=edit'>?</a>

$WikiPageCreateSpaceFmt
Same as $WikiPageCreateFmt, but used when the link text has a space in it.

$UrlLinkFmt
The (HTML) string to output for URL-links that begin with 'http:', 'ftp:', etc. Defaults to
        <a class='urllink' href='$Url'>$LinkText</a>

$UrlLinkTextFmt
The (HTML) string to output for URL-links that have alternate text specified. Defaults to the same value as $UrlLinkFmt.

本頁更新於 2004 年 03 月 12 日,09:16 AM