Skip to content

Exports txp page and form templates, css styles, plugins and site variables

License

Notifications You must be signed in to change notification settings

jools-r/jcr_export_txp_templates

Repository files navigation

Export Textpattern site design templates as files

This Textpattern plugin adds a new pane under ‘Extensions’ from which you can export pages, forms, CSS stylesheets, section infos and site variables to a specified templates folder for convenient editing using your preferred code editor. Use it to archive a site’s templates, or as an initial export from an existing site for use with rah_flat or oui_flat.

Installation

Paste the .txt or .zip.txt package code into the Admin > Plugins pane, and install and enable the plugin. Visit the “Extensions › Export templates” pane and get ready to export.

Usage

By default the plugin looks for a directory called /templates/export alongside the /textpattern directory. If the directory does not exist, the plugin will attempt to create it the first time you export your templates. If this should fail, you will need to create the directory manually and assign write permissions using chmod to 775 (or 777 if your host requires it) before you can proceed. The name you specify for your export will be created as a folder within the /templates/export folder along with the subfolders. You can then copy the desired folders to your rah_flat / oui_flat templates folder.

Settings

Forms are named according to the naming scheme {form-name}.{type}.txp by default. If you prefer the {type}.{form-name}.txp naming scheme, set the variable form_naming_scheme in the plugin source code appropriately:

'form_naming_scheme' =>  'type_name'

History

This is an excerpted and reworked version of mem_templates v0.2 with just export functionality. mem_templates was an adaptation of hcg_templates, which in turn was a modification of mcw_templates (github). This plugin builds on their work.

Changelog

0.15 – 2016-06-17

  • Inclusion of section.json files
  • Support for oui_flat_vars site variables (if present) as variable.json files
  • Textpack support
  • Uses Textpattern’s built-in error notices + Hive styling

0.1 – 2016-06-16

  • Initial version of stripped down mem_templates
  • Code modifications and updates for newer txp versions

About

Exports txp page and form templates, css styles, plugins and site variables

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages