Recent Changes - Search:

PmWiki

pmwiki.org

SkinTemplates-Talk

Understanding old config files

This information is deprecated, but we're still including it in the docs so you can better understand any really old local/config.php files you look at.

The original method of telling PmWiki where to find a skin used to be to set $PageTempateFmt to the path of a .tmpl file on the server. This is still respected by PmWiki, so if, for example, you were to set $PageTemplateFmt to ./pub/skins/foo/foo.tmpl then PmWiki would simply load and use that file, but without setting the special $SkinDir and $SkinDirUrl variables that are required by all modern skins.

DO NOT USE $PageTemplateFmt

How to do conditional output in skin?

Note that the following code, correct in a wiki page (without the "<!--markup:") doesn't work in a skin. <!--markup:(:if ! equal "{$LastModifiedBy}" "":)--> by {$LastModifiedBy} This is display everytime <!--markup:(:ifend:)--> (To continue to answered with a solution)

How to properly use the <!--file:path/somefile.php-->

in order to be able to php include a file that is hosted outside the pmwiki directory.
I want my template to have a php include to my site's footer php file so that it can be dynamic. Thank you.

You have to keep your php file where your pmwiki.php file is, so it can be automatically included or use the full path to your file with the "file:" skin directive.

How can I insert javascript in the skin template ?

When I try to do so, it seems that the Javascript is turned off. I'm missing something but I'm an amateur.

I've the same problem. Somebody please tell us something about, thanks.

For that matter is there any sort of programming language you can use in a template file?

Earlier I wrote some javascript to check if the page was being edited, and if so not display a sidebar, but ran into the problem above me. Are these files parsed with PHP? Or is there a way to use those embedded HTML comments mentioned in the article to accomplish what I mentioned?

Is there a way to replace <!-- PageText --> with mark up? I'd like to make one skin template with conditional markup based on action instead of several templates switched by action. I could do this in <!--markup: ... --> if I had a different way of including PageText.


This is a talk page for improving PmWiki.SkinTemplates.

Edit - History - Print - Recent Changes - Search
Page last modified on December 05, 2011, at 03:51 PM