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.
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.
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
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.
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!