Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 1 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

mcw_templates

This plugin creates a new tab under `extensions`, enabling the trivial export of pages, forms, and CSS rules to a specified folder for convenient editing, and the subsequent import of new and updated files.

Download

Download the current version of the plugin (0.2), or if you’re not interested in living on the edge, the previous version (0.1).

Requirements

This plugin has only been tested on 4.03. It might work on other version, but no promises!

Regardless of where it’s been tested, this plugin messes around with your database. Do not use it without backing up your database.

Setup

By default, the plugin looks for a directory named _templates in your textpattern directory. If the directory doesn’t exist, the plugin will attempt to create it the first time you export your templates. This creation will almost certainly fail, since the textpattern directory usually isn’t writable. In that case, you’ll need to create this directory, and ensure that the web server has write access. If your site is hosted at /users/home/myuser/web/public/, then the following commands could be used:

cd /users/home/myuser/web/public/ mkdir ./textpattern/_templates chmod 777 ./textpattern/_templates

Usage


To use the plugin, click through to the plugin’s tab, which should appear as a subtab of `extensions`. You’ll be presented with a list of importable file sets, and a textbox to name an export.

Exports are created in subdirectories of `_templates`, containing `form`, `css`, and `page` subdirectories. It’s a simple package format that’s still in flux, but I think it’s stable enough at this point to run with.

Credits


This plugin is more or less a total rewrite of Scott Woods’ Link Template 2 File . His idea was brilliant, but a bit cumbersome. I reworked everything so that it fit into a TextPattern admin plugin, and added a lot of error checking and documentation (and now new features!). Kudos, Scott!

Article Request Count:
Initially released:
9. April, 2006
Posted here:
10 Apr 2006

You know you want to visit the Archives.
Published with Textpattern