Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
pass a variable from a page to a form
In a site with many sections, I’ve templated my full html <code><head></code> data into a form called ‘head’ (!) so I don’t have to write it out the same meta/css/script info into every page template.
Now if I have a <code><script></code> that I only want to link to in the head of a particular section/page, is there a clever way to insert it into the ‘head’ form from the page template?
ie. when I call the <code><txp:output_form form=“head” />
</code> is there a way to somehow pass it a (non-article-related) variable or string – using txp tags or php?
Course, i could just write the full ‘head’ form contents into that page template and add the extra data – but I’m trying to be a smart arse ;)
Offline
#2 2006-05-17 11:19:58
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: pass a variable from a page to a form
In your head form you could try wrapping the additional script inside an if_section tag pair. Something like this…
<txp:if_section name="your_special_section">
Section specific script stuff in here. </txp:if_section>
— Steve
Offline
Re: pass a variable from a page to a form
that’s the bunny!
thanks Steve
Offline
Pages: 1