Recent Changes - Search:

CZjfaD , [url=http://nnredzsskgao.com/]nnredzsskgao[/url], [link=http://orsiupreszzr.com/]orsiupreszzr[/link], http://ajihppvvwlic.com/

SkinTemplates

PmWiki.SkinTemplates History

Hide minor edits - Show changes to markup

April 20, 2012, at 07:50 AM EST by cpwatkwee - olGtOJfMlzaEnNfmn
Changed line 1 from:

Ldxv69 <a href="http://jejmmepxqhqc.com/">jejmmepxqhqc</a>

to:

W2Uw80? , [url=http://mtxgznwbohxc.com/]mtxgznwbohxc[/url], [link=http://zgngnzwnvtmr.com/]zgngnzwnvtmr[/link], http://mgfbknqczbgn.com/

April 19, 2012, at 08:47 AM EST by exgehprb - jFZPkuOWidJY
Changed line 1 from:

a2oWhM , [url=http://uqbwvwjesccm.com/]uqbwvwjesccm[/url], [link=http://yowmutslvizm.com/]yowmutslvizm[/link], http://htacqnucgpuv.com/

to:

Ldxv69 <a href="http://jejmmepxqhqc.com/">jejmmepxqhqc</a>

April 19, 2012, at 02:52 AM EST by wgrhagwzxuq - QSIkFHQFpUnoYPL
Changed line 1 from:

MTWtR7? <a href="http://fdfkupkbjhox.com/">fdfkupkbjhox</a>

to:

a2oWhM , [url=http://uqbwvwjesccm.com/]uqbwvwjesccm[/url], [link=http://yowmutslvizm.com/]yowmutslvizm[/link], http://htacqnucgpuv.com/

April 17, 2012, at 10:22 PM EST by regxqk - DaIxyiKcOnK
Changed line 1 from:

hey there and thank you for your information – I’ve clartiney picked up something new from right here. I did however expertise some technical points using this web site, as I experienced to reload the website a lot of times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your high-quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and could look out for much more of your respective interesting content. Make sure you update this again very soon..

to:

MTWtR7? <a href="http://fdfkupkbjhox.com/">fdfkupkbjhox</a>

April 17, 2012, at 02:49 PM EST by Jorge - oeDLBnLKqlbjya
Changed line 1 from:

3ukAER , [url=http://jyswjlsfbfnq.com/]jyswjlsfbfnq[/url], [link=http://wiecohztqrxy.com/]wiecohztqrxy[/link], http://fpmuonftkjqd.com/

to:

hey there and thank you for your information – I’ve clartiney picked up something new from right here. I did however expertise some technical points using this web site, as I experienced to reload the website a lot of times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your high-quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and could look out for much more of your respective interesting content. Make sure you update this again very soon..

December 05, 2011, at 10:09 AM EST by ryemnoz - PXxXAOAwOXsmenvJWh
Changed line 1 from:

XWTWAA <a href="http://rmakqovxmnvz.com/">rmakqovxmnvz</a>

to:

3ukAER , [url=http://jyswjlsfbfnq.com/]jyswjlsfbfnq[/url], [link=http://wiecohztqrxy.com/]wiecohztqrxy[/link], http://fpmuonftkjqd.com/

November 30, 2011, at 02:27 PM EST by cdauil - gsUTEfzjmVkFY
Changed line 1 from:

fuHMR7 , [url=http://xwsfktsihxsr.com/]xwsfktsihxsr[/url], [link=http://fytijbgsqpwt.com/]fytijbgsqpwt[/link], http://xjfzqqyudcbz.com/

to:

XWTWAA <a href="http://rmakqovxmnvz.com/">rmakqovxmnvz</a>

November 28, 2011, at 08:58 AM EST by mswiqge - fcffUrMZcgqNPrUkWX
Changed line 1 from:

PPLoTc <a href="http://kdtdvpsvuqzn.com/">kdtdvpsvuqzn</a>

to:

fuHMR7 , [url=http://xwsfktsihxsr.com/]xwsfktsihxsr[/url], [link=http://fytijbgsqpwt.com/]fytijbgsqpwt[/link], http://xjfzqqyudcbz.com/

November 24, 2011, at 07:42 AM EST by xqnhvks - vlttvUKchHZjvmmWUC
Changed line 1 from:

Infoarmtion is power and now I'm a !@#$ing dictator.

to:

PPLoTc <a href="http://kdtdvpsvuqzn.com/">kdtdvpsvuqzn</a>

November 23, 2011, at 10:54 PM EST by Kaeden - tsaguMWQ
Changed lines 1-101 from:

This page describes the skin template files (.tmpl) that are used to create PmWiki skins, and how PmWiki uses them. 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 Processing

PmWiki processes any skin.php file in the skin directory before loading any templates. If there is no skin.php file, or if the skin.php file doesn't load a template, then PmWiki falls back to looking for a template with the same name of the skin, or a single .tmpl file if it exists.

In simpler setups (which is what the vast majority of skins have), the skin.php file is absent or makes no mention of the .tmpl file, and so PmWiki finds and loads the template itself. To exert greater control over the process, simply call LoadPageTemplate() inside the skin.php file, with the name of the .tmpl file to be loaded:

LoadPageTemplate($pagename, "$SkinDir/xyz.tmpl");

For example, a skin might specify a special template to be used if the action is 'print':

if ($GLOBALS['action'] == 'print')
LoadPageTemplate($pagename, "$SkinDir/print.tmpl");

When the action is something else, the default skin gets loaded instead.

Template file format

A 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 <!--PageText--> belongs to the <body> section of the HTML document, and tells PmWiki where the main content of each wiki page should be placed. The other required directive is <!--HTMLHeader-->, which goes somewhere in the <head> section of the HTML document.

There is also an optional <!--HTMLFooter--> directive, which typically goes before the final </body> tag and is used by some recipes to insert things at the end of the HTML document.

When PmWiki displays a page, it replaces the directives and variable substitutions with the values appropriate to the current page. For example, the <!--PageText--> directive is replaced with the page's contents, while any instances of $PageUrl are replaced with the url (address) of the current page.

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, $SkinDirUrl, is particularly useful in templates as it allows the skin designer to refer to other files (such as images or style sheets) in the skin folder without having to know the exact url.

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. Page variables can also be used in templates.

Skin directives

Besides the required <!--PageText--> and <!--HTMLHeader--> directives, PmWiki provides other built-in directives for generating page output. It's not necessary to use any of these directives, but they can often add capabilities to a skin

<!--wiki:Main.SomePage-->
The <!--wiki:Main.SomePage--> directive outputs the contents of Main.SomePage. $-substitutions are allowed in directives, thus a directive like <!--wiki:$Group.SomePage--> will include "SomePage" of the current group.
If multiple pages are listed in the directive, then only the first available page is used. Thus <!--wiki:$Group.SomePage Site.SomePage--> will display the contents of SomePage in the current group if it exists, and Site.SomePage if it doesn't. To always display Site.SomePage, even if $Group.SomePage exists, use two consecutive <!--wiki:...--> directives.
<!--file:somefile.txt-->
The directive <!--file:somefile.txt--> outputs the contents of another file (on the local filesystem) at the point of the directive. If the file to be included is a .php script, then the PHP script is executed and its output is sent to the browser. Like the <!--wiki:...--> directive above, $-substitutions are available to be able to output files based on the current page name or group.
<!--markup:...-->
The markup directive processes any text that follows the colon as wiki markup and displays that in the output.
<!--function:SomeFunction args-->
This directive calls a PHP function named "SomeFunction", passing the current page's name and the text following the function name as arguments. PHP functions called in this manner are typically defined in a local customization file. Args allows only one argument, which has to be splitted then. <!--function:SomeFunction arg1 arg2 arg3--> generates one parameter "arg1 arg2 arg3". However variables can be used (like $LastModifiedBy).

Page sections

A 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 <!--Page...Fmt--> and continues to the next section, the end of the template file, or <!--/Page...Fmt-->. For example, a template can specify a <!--PageLeftFmt--> section that is excluded from the output whenever the (:noleft:) directive is encountered in the page's contents. PmWiki's predefined sections (and their corresponding page directives) are:

    <!--PageHeaderFmt-->          (:noheader:)
    <!--PageFooterFmt-->          (:nofooter:)
    <!--PageTitleFmt-->           (:notitle:)
    <!--PageLeftFmt-->            (:noleft:)
    <!--PageRightFmt-->           (:noright:)
    <!--PageActionFmt-->          (:noaction:)

Skin designers can define custom sections and markups, but currently all section names in the template must begin with "Page" and end with "Fmt". As mentioned you also have to define the corresponding markup (for example in your config.php) like this:

    Markup('noxyz', 'directives',  '/\\(:noxyz:\\)/ei',
       "SetTmplDisplay('PageXYZFmt',0)"); 

Internationalization (i18n)

Skins can also be internationalized by using $[...] substitutions. Any string placed inside of $[...] is treated as a "translatable phrase", and the phrase is looked up in the current translation tables for a corresponding output phrase. If a translation is available, then the translated phrase is substituted at that point, otherwise the original phrase is left intact.

For example, the substitution $[Edit] will display the current translation of "Edit" if it is known, otherwise it displays "Edit". Thus, the same template can be used for multiple languages, displaying "Editer" when French translations are loaded, "Bearbeiten" when German translations are loaded, and "Edit" when no translation is available.

<< SitePreferences | DocumentationIndex | SpecialCharacters >>

How do I customize the CSS styling of my PmWiki layout?

See Skins for how to change the default PmWiki skin. See also Cookbook:Skins, where you will find pre-made templates you can use to customize the appearance of your site. You can also create a file called local.css in the pub/css/ directory and add CSS selectors there (this file gets automatically loaded if it exists). Or, styles can be added directly into a local customization file by using something like:

$HTMLStylesFmt[] = '.foo { color:blue; }';

Where can the mentioned "translation table" be found for adding translated phrases?

See Internationalizations.

to:

Infoarmtion is power and now I'm a !@#$ing dictator.

Edit - History - Print - Recent Changes - Search
Page last modified on April 20, 2012, at 07:50 AM EST