<< | 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.
<!--HTMLHeader--> directive. This array provides an easy place for scripts to add custom HTML headers.
$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" />';
$HTMLHeaderFmt['rss'] =
'<link rel="alternate" type="application/rss+xml" title="Rss All recent Changes"
href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';
<!--HTMLFooter--> directive (usually just before a closing </body> tag). Primarily used by scripts to add custom HTML output after the body of the page output.
<meta name='robots' ... /> tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki wiki group?. Explicitly setting $MetaRobots overrides this default.
# never index this site
$MetaRobots = 'noindex,nofollow';
# disable the robots tag entirely
$MetaRobots = '';
(:messages:) markup. Commonly used for displaying messages with respect to editing pages.
$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = '* [[$Group.$Name]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]=][='; $RecentChangesFmt['$Group.RecentChanges'] = '* [[$Group/$Name]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]=][=';
$RCLinesMax = 1000; # maintain at most 1000 recent changes
(:redirect:) markup.
$PageRedirectFmt = '<p><i>redirected from $FullName</p>'; $PageRedirectFmt = '';
(:include:) and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.
$MaxIncludes = 50; # default
$MaxIncludes = 1000; # allow lots of includes
$MaxIncludes = 0; # turn off includes
$SkinLibDirs = array( "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin", "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");
1 page URL will be ...wiki.php/Main/Main, when set to 0 (default) it will be ...wiki.php?n=Main.Main.
$GroupHeaderFmt = '(:include $Group.GroupHeader:)(:nl:)';
$GroupFooterFmt = '(:include $Group.GroupFooter:)(:nl:)';
# default $PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found'; # return all pages as found $PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';
$HTMLVSpace = ''; in a local customizationfile (e.g., local/config.php) prevents insertion of spacer paragraphs (<p class='vspace'></p>) in generated HTML code. To limit this change to a single skin, place the $HTMLVSpace = ''; statement in a skin.php file, preceded by the statement global $HTMLVSpace;.
<td> or <th> cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.
<tr> element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.
# Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )
$TableRowAttrFmt = "class='tr\$TableRowCount'";
# Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )
$TableRowIndexMax = 2;
$TableRowAttrFmt = "class='ti\$TableRowIndex'";
# Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...
$TableRowIndexMax = 3;
See also: Edit Variables?