Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Topping and tailing pages, forms, etc
Hi.
Over the years I’ve developed a template to use with all my pages, forms and other chunks of admin-side code. I want to balance code readability on the admin-side with as much minifying on the front-end as is feasible. I use rah_replace
to zap tab stops and line breaks, hide
to annotate the file for easier offline searching in both SQL dumps and CodeBox, and to reduce the chance of my over-writing a chunk of code with an errant copy+paste I have the same text at the beginning and end of the file so I can quickly check my paste has gone into the correct pane. Here’s an example:
<txp:rah_replace from="
" to="">
<txp:hide>
*******************************************************
Site: example.com
Name: links_foo
Type: form, links
Info: used to populate content of woo
*******************************************************
</txp:hide>
CODE GOES IN HERE
<txp:hide>
*******************************************************
Site: example.com
Name: links_foo
Type: form, links
Info: used to populate content of woo
*******************************************************
</txp:hide>
</txp:rah_replace>
I’m posting here in case you might find it useful; please have it with my best wishes.
Offline