<<|PmWiki.Variables|>>
Variable substitutions in the skin template are all managed by the `FmtPageName() function from pmwiki.php. Pmwiki variable substitutions available on pages are managed by the substitutions from stdmarkup.php or superseded in local/config files.
:$WikiTitle:A variable which contains the Wiki title as displayed by the browser
:$HTMLStylesFmt:An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.
:$HTMLHeaderFmt:An array of HTML text to be included in the page's
section, at the point where the skin template specifies a ->For example, if you want to specify a logo for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):
$HTMLHeaderFmt['logo'] = '<link href="http://your/wiki/path/to/your/logo/logo.png" type="image/png" rel="icon" /> <link href="http://your/wiki/path/to/your/logo/logo.ico" type="image/x-icon" rel="shortcut icon" />'; ->Another example, if you want to get the rss notification on some browsers (the rss icon in firefox for instance):
$HTMLHeaderFmt['rss'] = '<link rel="alternate" type="application/rss+xml" title="Rss All recent Changes" href="$ScriptUrl/Site/AllRecentChanges?action=rss" />'; :$HTMLFooterFmt:Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the skin template specifies a :$MetaRobots:Sets the value of the
:$MessagesFmt:An array of HTML text to be displayed at the point of any :$RecentChangesFmt:An array specifying the format of the RecentChanges listing. ->The format can be specified in your config.php using the following:
$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = '* [[$Group.$Name]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]=][='; $RecentChangesFmt['$Group.RecentChanges'] = '* [[$Group/$Name]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]=][='; ->Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit. :$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages. The default is zero, meaning "no limit".
:$PageRedirectFmt:The text to be used when a page is redirected via the $PageRedirectFmt = '<p><i>redirected from $FullName</p>'; $PageRedirectFmt = ''; ->For display options, see also the FAQ on PageDirectives. :$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.<<See: PmWiki.CustomWikiStyles :$MaxIncludes:Controls the number of times that pages can be included via the :$Skin:Points to the directory of an own or different layout skin. :$SkinDirUrl:Set by scripts/skins.php to be the base url of the current skin's directory (i.e., within a 'pub/skins/' directory). This variable is typically used inside of a skin .tmpl file to provide access to .css files and graphic images associated with the skin. :$SkinLibDirs:An associative array which PmWiki uses to locate skin directories (containing a .tmpl file) and provide the associated url for any such directory found (e.g., to obtain any .css or graphic images for the skin). $SkinLibDirs is an array of key/value pairs; the key is a path to a potential skin directory, while the value is the corresponding url prefix to use if the skin is found at the location given by the key. By default $SkinLibDirs is set to:
$SkinLibDirs = array( "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin", "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin"); :$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually). :$EnablePathInfo:Changes the handling of the page URL. When set to :$EnableFixedUrlRedirect:When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting $EnableFixedUrlRedirect=0; blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect. :$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:
:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:
:$PageNotFoundHeaderFmt:Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work. --> # default $PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found'; # return all pages as found $PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok'; :$HTMLVSpace:Setting :$TableCellAttrFmt:For Tables, defines the HTML attributes given to each :$TableRowAttrFmt:For Tables, defines the HTML attributes given to each
:$TableRowIndexMax:The maximum value for $TableRowIndex in Tables.
See also: Edit Variables
|
---|