Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2004-08-07 16:40:55
- 2cats
- Member
- Registered: 2004-07-17
- Posts: 10
can you place txp statements inside a plugin?
What I would like to try is making a switch/case function plugin. This would be like:
<code>
switch(){
if(condition a)
<txp: do_this />;
if(condition b)
<txp: do_that />;
}
</code>
I know the syntax isn’t right, but you get the idea.
My question is, how can I write the <txp: statements />;
so that they will work as expected from a plugin?
Thanks
Offline
#2 2004-08-07 23:04:05
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: can you place txp statements inside a plugin?
Textpattern tags are all functions, i.e. do_this().
Their parameters are the same as for plugin functions – ($atts) for empty tags, ($atts, $thing) for enclosing tags.
Alex
Offline