Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Text asset naming scheme best practice & form wildcards
The downside to form groups is they don’t nest, but as long as you only need one layer of grouping, it might work out.
If you want to get number-order-freaky, name your groups:
0-anywhere
1-pre-html
2-head
3-header
…
That way (as long as you don’t have more than 10 and have to switch to double-digits) they stay in order in the Forms panel and anyone in future not conversant with your numbering scheme still has an idea of where to find forms that go in a particular slot in the template.
FWIW, you may find being this regimented has a negative impact wrt reuse because if you want to use the same form to render a sitemap in your ‘footer’ as you do in your ‘nav’ you either have to:
- Duplicate it in the relevant group. Makes long-term maintenance harder.
- Stick it in 0-anywhere. The dreaded “misc”.
- Put it in 0-anywhere but add a stub form to both ‘nav’ and ‘footer’ groups that calls
<txp:output_form form="030-nav-list" />
. Retains logical structure, but has more indirection and is consequently one function call ‘slower’ than either of the previous methods (this being Txp, speed is relative and there’s tonnes of headroom, but still…)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Text asset naming scheme best practice & form wildcards
Bloke, you have this innate ability to make me want to try stuff out. Good job my social calendar is pretty sparse…
Offline