Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Using php or txp tag to call form within txp tag
So I’m setting up a site for a client. Trying to keep it as basic as possible for them to make changes.
I’m using the plugin ras_section_custom to help with the output of a navigation menu for sections.
The code I’m using is as follows
<code><txp:ras_section_custom break=“dt” name=“list of sections here” link=“1” title=“1” /></code>
What I’d like to do is setup a form just for the list of sections, nothing else. That way the client can login and when it comes time to adding sections, he just edits the list without having to worry about all the other code. Another reason is that I’m using the above tag again with a slight modifaction. I’m going to have a main nav down the side column, with another one in the footer. Thus he client would have to make changes twice.
What I’d like to do in theory is something like this
<code>
<txp:ras_section_custom break=“dt” name=”<txp:output_form form=“template_navigation” />” link=“1” title=“1” />
</code>
Where the “template_navigation” would just be a single list of sections.
Is this at all possible with php or txp tags? So far what I’ve tried doesn’t work.
Offline
#2 2006-04-06 05:21:14
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Using php or txp tag to call form within txp tag
Yeah, you can’t use tag output as another tag’s parameter (unless you’re talking about a plugin where the author has specifically allowed for this).
You can still do what you want, though. The php Textpattern tag allows you to use PHP in your page(s)/form(s), and then all you do is construct the PHP equivalent of your tags:
<txp:php>echo ras_section_custom(array(
'break' => 'dt',
'name' => output_form(array('form' => 'template_navigation')),
'link' => 1,
'title' => 1
));</txp:php>
:)
Offline
Re: Using php or txp tag to call form within txp tag
Excellent. That does the job perfectly.
Thanks so much.
Offline