EasyTemplates

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Description

This add-on script allows you to create a default template for your entire site. The script also automatically detect the presence of PageTemplate(s) and GroupTemplate(s), and use them accordingly. There is also a plain-vanilla template included in the script to help you get started.
The script won't over-write or change any existing customizations or original PmWiki files. Only 9 lines of code in this script!

Author

Special Thanks

Thanks to Pm (Patrick Michaud?, www.pmichaud.com), for creating PmWiki, and for sharing his knowledge and insightfulness which is what made this script possible.

Installation

  1. Create a new directory: /local/scripts.
  2. Save the file easy_templates.php in the new directory you just created.
  3. Add this one line to your config.php file:
include_once("local/scripts/easy_templates.php");

Download

Documentation

Full documentation and installation instructions are included in the script.

History

  • March 18, 2004 - Added support for PageTemplates, updated instructions, updated default.htm template.
  • March 3, 2004 - First release.

Comments

  • It would be great if this script allowed wiki-editing of the pages and templates, rather than having to edit things on the filesystem. I use Wiki for everything; my goal is to get the Wiki to do more of the work so users have more control. Of course, templates probably don't change as often as all that, so perhaps it's not too important. --JamesCarlson
  • Oh, I changed the script slightly to put the templates in a /pub/templates directory, rather than a /pub/skins directory; it's an easy search-replace. I did this because I wanted to separate concerns-- skins are not templates and vice versa. --JamesCarlson

pmwiki-2.3.32 -- Last modified by {{JamesCarlson}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons