Hicksdesign Go to the source
One of Textpattern’s drawbacks has always been that page templates are saved in the database. Editing them means using the textarea in the TXP admin interface, but I’m sure most people would prefer to use their favourite text editor. Here’s a workaround that works in TXP 4.2.0 (I haven’t tried other versions). Once you’ve enabled ‘Allow PHP in pages?’ in Advanced Preferences and set up your sections and page templates, put everything in your page template into a file (such as ‘pagetemplate.php’), and replace it with a PHP include: <txp:php>$docRoot = getenv("DOCUMENT_ROOT");include($docRoot.'/pagetemplate.php');</txp:php> You still need to setup your templates in TXP admin, but from there on in, you can edit the templates in a text editor and upload them. There may be a performance hit doing this, but all TXP tags work. Much easier! Update : Thanks to Sam Brown for this much neater version: <txp:php>include(txpath.'/pages/default.php');</txp:php> This is much shorter, but be aware that the ‘txpath’ value takes you to the textpattern folder rather than the site root… Read the rest here