version=pmwiki-2.2.61 ordered=1 urlencoded=1
author=Petko
charset=UTF-8
csum=$EnableTableAutoValignTop
name=PmWiki.LayoutVariables
rev=113
targets=PmWiki.PageDirectives,PmWiki.PageHistory,PmWiki.SkinTemplates,PmWiki.WikiGroup,PmWiki.Questions,Cookbook.RecentUploadsLog,PmWiki.CustomWikiStyles,PmWiki.WikiStyles,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.EditVariables
text=(:Summary:variables that control page layout:)%0aVariable 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 {$var} substitutions from stdmarkup.php or superseded in local/config files. %0a%0a:$ActionSkin:This array is used to override the current skin when performing a given action. The most common use is to set @@$ActionSkin['print']='foo'@@ to use the 'foo' skin when printing, regardless of what the @@$Skin@@ variable is set to.%0a%0a:$WikiTitle:A variable which contains the Wiki title as displayed in the browser tab and at the top of the browser window.%0a%0a:$EnablePageTitlePriority:A variable defining how to treat multiple @@ [=(:title ...:)=] @@ [[page directives]]  (added in PmWiki 2.2.9).%0a: : @@$EnablePageTitlePriority = 0;@@ # PmWiki default, last encountered title wins (the title may be changed from included pages or GroupFooter).%0a: : @@$EnablePageTitlePriority = 1;@@ # First title wins; if a title is defined in the page, directives from included pages cannot change it.%0a%0a:$EnableDiffInline:If set to 0, this variable switches off the word-level highlighting on the markup in the [[page history]].%0a: : @@$EnableDiffInline = 0;@@ # Disable colors, show plain text differences%0a%0a:$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.%0a%0a:$HTMLHeaderFmt:An array of HTML text to be included in the page's %3chead> section, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLHeader-->@] directive.  This array provides an easy place for scripts to add custom HTML headers.%0a%0a->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):%0a-->[@ %0a$HTMLHeaderFmt['logo'] =%0a  '%3clink href="http://path/to/logo.png" type="image/png" rel="icon" />%0a  %3clink href="http://path/to/logo.ico" type="image/x-icon" rel="shortcut icon" />';%0a@]%0a%0a->Another example, if you want to get the rss notification on some browsers (the rss icon in firefox for instance):%0a-->[@ %0a$HTMLHeaderFmt['rss'] =%0a  '%3clink rel="alternate" type="application/rss+xml" title="Rss All recent Changes" %0a     href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';%0a@]%0a%0a:$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(s)]] specifies a [@%3c!--HTMLFooter-->@] directive (usually just before a closing %3c/body> tag).  Primarily used by scripts to add custom HTML output after the body of the page output. %0a%0a:$MetaRobots:Sets the value of the [@%3cmeta 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.%0a        # never index this site%0a        $MetaRobots = 'noindex,nofollow';%0a        # disable the robots tag entirely%0a        $MetaRobots = '';%0a%0a:$MessagesFmt:An array of HTML text to be displayed at the point of any [@(:messages:)@] markup.  Commonly used for displaying messages with respect to editing pages.%0a%0a:$RecentChangesFmt:An array specifying the format of the RecentChanges listing.%0a%0a->The key of the array specifies the page where changes will be logged, as in%0a-->[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges']%0a@]%0a->The value of the array specifies the format in which the changes will be logged, as in%0a-->[@%0a'* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'%0a@]%0a->Note the two consecutive spaces before the three dots (@@. . .@@). The two spaces separate two parts of the format: the first part doesn't change (e.g. a link to the changed page) and the second part does change (e.g. the date and author of the change). Upon saving a page, PmWiki removes a line that matches the first part and adds a line with the current format before the first line with 2 spaces. This way, any line without two consecutive spaces stays at the top of the recent changes page.%0a%0a->You can use and adapt the following to change the format (put it in config.php):%0a-->[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = %0a  '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$RecentChangesFmt['$Group.RecentChanges'] =%0a  '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a@]%0a%0a->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.%0a%0a->Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here [[PmWiki:Questions|PmWiki Questions]].%0a%0a:$RecentUploadsFmt:An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information.%0a%0a:$DraftRecentChangesFmt:An array specifying the format of the RecentChanges listing when saving Draft pages.%0a%0a->$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved.  For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:%0a-->[@%0a$DraftRecentChangesFmt['$Group.RecentDraftChanges'] =%0a  '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$DraftRecentChangesFmt['$Group.RecentChanges'] = '';%0a@]%0a%0a:$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages.  The default is zero, meaning "no limit".%0a        $RCLinesMax = 1000;       # maintain at most 1000 recent changes%0a%0a:$PageRedirectFmt:The text to be used when a page is redirected via the [@(:redirect:)@] markup.%0a-->[@%0a$PageRedirectFmt = '%3cp>%3ci>redirected from $FullName%3c/p>';%0a$PageRedirectFmt = '';%0a@]%0a->For display options, see also the FAQ on [[(PmWiki:)PageDirectives(#faq)]].%0a%0a:$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.[[%3c%3c]]See: [[PmWiki.CustomWikiStyles]]%0a%0a:$WikiStyleApply:An array which defines the scope of wiki styling per HTML element. Default settings are:%0a->[@%0a'item' => 'li|dt',%0a'list' => 'ul|ol|dl',%0a'div' => 'div',%0a'pre' => 'pre',%0a'img' => 'img',%0a'block' => 'p(?!\\sclass=)|div|ul|ol|dl|li|dt|pre|h[1-6]',%0a'p' => 'p(?!\\sclass=)'%0a@]%0a%0a->This defines that we can apply wiki styling on:%0a* LI elements using the ''item'' keyword%0a* UL, OL, DL elements using the ''list'' keyword%0a* etc.%0a%0a->An example of applying scope to an LI element is below. For more information refer to [[PmWiki/WikiStyles#Scopes | WikiStyle scopes]].%0a(:markup class=horiz:) %0a* %25apply=item red%25Here is a red styled list item%0a* This item would not be styled.%0a(:markupend:)%0a%0a->You can [[PmWiki.WikiStyles#WikiStyleApply | add additional HTML elements to $WikiStyleApply]] to apply wiki styles to other HTML elements. For example to allow styling on table rows, or anchor tags.%0a%0a:$MaxIncludes:Controls the number of times that pages can be included via the [@(: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.%0a        $MaxIncludes = 50;            # default%0a        $MaxIncludes = 1000;          # allow lots of includes%0a        $MaxIncludes = 0;             # turn off includes%0a%0a:$[=Skin=]:Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is a the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.%0a%0a:$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.%0a%0a:$SkinLibDirs:An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).%0a%0a->The array key is the directory containing the skin.tmpl and skin.php files, as seen by the PmWiki program. It does not have to be publicly accessible.%0a%0a-> The value is the URL (web address) of the directory containing the .css, .gif, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.%0a%0a->By default $SkinLibDirs is set to:\\%0a[@%0a$SkinLibDirs = array(%0a  "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a  "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a->Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.%0a%0a:$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually).%0a%0a:$EnablePathInfo:Changes the handling of the page URL. When set to @@1@@ page URL will be @@...wiki.php/Main/Main@@, when set to @@0@@ (default) it will be @@...wiki.php?n=Main.Main@@.%0a%0a:$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. %0a%0a:$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:%0a        [@$GroupHeaderFmt = '(:include $Group.GroupHeader:)(:nl:)';@]%0a%0a:$GroupPrintHeaderFmt:Defines the markup placed at the top of every page when [@action=print@]. Default value is:%0a        [@SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader:)(:nl:)');@]%0a%0a:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:%0a        [@$GroupFooterFmt = '(:include $Group.GroupFooter:)(:nl:)';@]%0a%0a:$GroupPrintFooterFmt:Defines the markup placed at the bottom of every page when [@action=print@]. Default value is:%0a        [@SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter:)');@]%0a%0a:$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.%0a%0a-->[@%0a# default%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';%0a# return all pages as found%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';%0a@]%0a%0a->Beware when expecting to return the content of a Group(header|footer) for an non existent page!  By default PmWiki returns 404 (because the page does not exist), despite there is some content to show.  Firefox shows the content, while Internet Explorer displays its default 404 page.  $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.%0a%0a:$HTMLVSpace:Setting [@$HTMLVSpace = '';@] in a local customizationfile (e.g., [@local/config.php@]) prevents insertion of spacer paragraphs ([@%3cp class='vspace'>%3c/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;@].%0a%0a:$HTMLPNewline:This variable allows to enable linebreaks by default, i.e. without having the directive [=(:linebreaks:)=] in a page or in a GroupHeader. To enable line breaks, add to config.php such a line:\\%0a  @@$HTMLPNewline = '%3cbr/>'; @@%0a%0a:$TableCellAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctd>@@ or @@%3cth>@@ cell in the output.  Can contain references to $TableCellCount which holds the horizontal column number of the current cell.%0a%0a:$TableCellAlignFmt:For [[Tables]], defines the HTML attributes for alignment of each @@%3ctd>@@ or @@%3cth>@@ cell. Default is @@" align='%25s'"@@ where %25s will be replaced with 'center', 'left' or 'right'. For a valid HTML5 output you may want to change this in config.php:\\%0a@@$TableCellAlignFmt = " class='%25s'";@@\\%0athen define the CSS classes td.center, td.right and td.left (also th).%0a%0a:$TableRowAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctr>@@ 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.%0a        # Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )%0a        $TableRowAttrFmt = "class='tr\$TableRowCount'";%0a        # Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )%0a        $TableRowIndexMax = 2;%0a        $TableRowAttrFmt = "class='ti\$TableRowIndex'";%0a%0a:$TableRowIndexMax:The maximum value for $TableRowIndex in [[Tables]].%0a        # Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...%0a        $TableRowIndexMax = 3;%0a%0a:$EnableTableAutoValignTop:[[TableDirectives|Advanced tables]] are intended for layout, and automatically insert the @@valign='top'@@ attribute if there is no @@valign@@ attribute defined in the markup source. Setting this variable to 0 in config.php will prevent the automatic addition.%0a        $EnableTableAutoValignTop = 0; # disable automatic valign='top' attr%0a %0a:$FmtV['$TableCellCount']:PMWiki internal variable - Horizontal column number of the current cell. For use in $TableCellAttrFmt and $TableRowAttrFmt.  Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a        [@Example: $TableCellAttrFmt = 'class=col\$TableCellCount';@] %0a%0a:$FmtV['$TableRowCount']:PMWiki internal variable - Current row number.  Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a        [@Example: TableRowAttrFmt = "class='row\$TableRowCount'";@] %0a%0a:$FmtV['$TableRowIndex']:PMWiki internal variable - Row index number derived from $TableRowIndexMax.  (1,2,3,1,2,3,...). Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a        [@Example: $TableRowAttrFmt = "class='ind\$TableRowIndex'";@]%0a%0aSee also: [[Edit Variables]]%0a
time=1393589683
