|
Test |
PmWiki • SkinTemplates
This page describes the format of the skin template files (.tmpl) that are used to create PmWiki skins. As described in the skins page, a skin is a collection of files that specifies the layout for PmWiki pages. Each skin must include a template file that provides the skeleton for displaying a PmWiki page. Template file formatA template file is basically an HTML file that also contains variable substitutions (indicated by '$') and special directives embedded in HTML comments. Two special directives are required in the template file. The directive When PmWiki displays a page, it replaces the directives and variable substitutions with the values appropriate to the current page. For example, the There is a long list of variables available for substitution in pages; some of the most useful include: $PageUrl the url of the current page
$ScriptUrl the base url to the pmwiki.php script
$Title the page's title (e.g., "`SkinTemplates")
$Titlespaced the page's title with spaces (e.g., "Skin Templates")
$Group the name of the current group (e.g., "`PmWiki")
$FullName the page's full name (e.g., "`PmWiki.SkinTemplates")
$LastModified the page's last modification time
$PageLogoUrl the url of a site logo
$WikiTitle the site's title
$SkinDirUrl the url of the skin's folder
This last variable, The template is not limited to using the variables listed here; nearly any PHP global variable that begins with a capital letter can be used in a skin template. Skin directivesBesides the required
Page sectionsA template file can designate "sections" that are included or excluded from the output based on page directives or other criteria. A section always begins with <!--PageHeaderFmt--> (:noheader:)
<!--PageFooterFmt--> (:nofooter:)
<!--PageTitleFmt--> (:notitle:)
<!--PageLeftFmt--> (:noleft:)
<!--PageRightFmt--> (:noright:)
Skin designers can define custom sections and markups, but currently all section names in the template must begin with "Page" and end with "Fmt". Internationalization (i18n)Skins can also be internationalized by using For example, the substitution << SitePreferences | DocumentationIndex | SpecialCharacters >> |
Apr 2013: Feb 2013: Jan 2013: Aug 2012: Apr 2012: Yate 4.1 released: better Gvoice support, iSAC codec, support for new Wanpipe drivers. Fixes – T.38 and Mac client issues. Mar 2012: Feb 2012: Nov 2011: Nov 2011: 04 May 2011: 12 Apr 2011: 9 Mar 2011: Feb 2011: 31 Jan 2011: 20 Dec 2010: 3 May 2010: 8 March 2010: 6-7 February 2010: 2 Nov 2009: 6 Aug 2008: 4 Aug 2008: |