Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-06 20:24:54
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Inline form definition
I’d like to announce to the forum a patch I’ve put together which allows you to define article and link forms inside the <txp:article />
or <txp:linklist />
tag, like so:
<txp:article><txp:title /><br /></txp:article>
<txp:linklist><txp:linkdesctitle /></txp:linklist>
I find it useful for short forms; it keeps one from having to hop between the “page” and “form” tabs constantly. I think it also makes page templates a little more readable. Instead of looking at a template and seeing <txp:article form="frontpage" />
and having to ask yourself, “Now what does that form do?”, you can instead see:
<txp:article><h3><txp:title /></h3><txp:excerpt /></txp:article>
and know at once how the content will be rendered.
I suppose theoretically there might be some speed gain as well; for an inline-defined form TXP won’t have to fetch the form out of the database.
Of course, the <txp:article />
, <txp:article_custom />
, and <txp:linklist />
tags continue to function normally when used without an inline form.
-Kurt
kurt@kurtraschke.com
Offline
Pages: 1