Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 1 No
Flag it:
Contact Reason [ ? ]

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

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (4)

This is exactly what I was searching for! Thank you!
Martin:

Something’s up with the file permissions on the files it creates. Can’t edit, CHMOD or delete anything.

This is a great way to backup your forms and pages. Thanks for the awesome plugin Mike.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern