Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Plugin: If Section
i have it working with rc3.. but if you need, there’s also ob1_if_section.
i use both, actually, and find i can nest the one in the other :)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#32 2005-05-05 23:49:13
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: Plugin: If Section
I’ve asked around and as far as I can tell, rc3 shouldn’t be a problem. Maybe if you post how you’re writing it, it would help.
Offline
Re: Plugin: If Section
Alicson thanks…..I always forget about that one. If I can’t get this working I will try that out.
Remillard I am trying to use one page so what I have done in the past was set up section conditionals to output section specific forms and articles. For some reason this go around I am not getting any output whatsoever. I look at the generated source code and my comments are there ( I comment all the conditionals so I know what the hell is going on later If I don’t look at a page for a while), but none of the called forms/articles are being pumped out for some reason. If I take out the conditional everything shows up fine. A bisic example that I was flustered with today was.
EDIT: OK Remillard I got it working. I diabled spc_section_alias and all is working….So I either have a basic typo somewhere in the string for spc_section_alias (most likely candidate) or there is something fishy between the two (least likely candidate). I will look deeper and if the problem persists I will report back.
Thanks! I always get so much mileage out of your plugin. Much appreciated.
Last edited by soulship (2005-05-06 02:16:45)
Offline
#34 2005-05-06 04:54:13
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: Plugin: If Section
Glad it’s working now.
I’ve never used the section aliasing plugin so I’m not certain what sorts of things it modifies. if_section uses the $s variable so if there’s another plugin that monkeys with that, there could be issues. Though, if you know what that other plugin is chaing $s to, then it should still work I would think.
Offline
Re: Plugin: If Section
Yeah spc_section alias does seem to bee monkeying with the conditional output. Darnit, it is really nice to alias the section names to what I want, but I need conditionals more ;)
Offline
#36 2005-07-21 23:11:23
- ndp
- Member
- Registered: 2005-07-20
- Posts: 12
Re: Plugin: If Section
Hi,
Question for y’all:
I have a mdn_if_section statement in my default article form. When I am looking at a individual article article the if statement works fine. But when I am looking at an article list, it doesn’t work. I also tried putting the if statement in the page and that didn’t work either.
From reading the posts, it sounds like a lot of you have successfully done this. I’m just looking to use a single “page” to display several article headers.
The site is www.natepaine.com. The following code is in my default article form. If the statement is working correctly, it should display “article article”…
[txp:section /]
[txp:mdn_if_section section = “article”] article [/txp:mdn_if_section]
note: replaced <> with [] for display purposes.
Any help would be appreciated!
Thanks,
Nate
Oh, and I am running RC3.
Last edited by ndp (2005-07-21 23:13:16)
Offline
#37 2005-07-24 17:17:53
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: Plugin: If Section
To my knowledge it works fine with RC3, and it looks like you’re using it the right way. You might read above to see if there are some incompatibilities with other plugins you may be running. For example, the section renaming plugin is known to cause some problems with if_section.
I’m not 100% certain but TXP might have if_section as a built-in tag too, so you might try looking for that. If you have other information that could be helpful for debug, let me know.
Regards,
Remillard
Offline
#38 2005-07-26 18:09:20
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Plugin: If Section
ndp,
It definitely should NOT be in your article form.
<code><txp:mdn_if_section section=”…”><txp:article form=”…” etc. /></txp:mdn_if_section></code><br />
<br />on the page template has been working fine for me for ages, also in RC3.
Offline
#39 2005-07-28 03:10:22
- ndp
- Member
- Registered: 2005-07-20
- Posts: 12
Re: Plugin: If Section
els,
I tried all the combinations here – putting the code in the page, the form, and the article itself. I couldn’t get any to work. I couldn’t even get the direct php call to echo the section correctly when in article_list. If it returns anything, it returns “default” as the section.
thanks,
nate
Offline
Re: Plugin: If Section
I’ve not used this plug-in so I can’t really comment on it’s usage but I’ve been using the ob1_if_section plug-in for ages now including at RC4 without problem to keep my page templates to a minimum.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#41 2005-07-28 16:59:51
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Plugin: If Section
Well, my site is glued together with this plugin, it has always been working for me and I just found out that it works in RC4 as well; and of course, nate, you could change to ob1’s plugin, but I have to defend my favourite plugin :) I really don’t believe there is anything wrong with it. So if you want to give it another try, just show us the exact code you’re using and I’m sure we can find out what the trouble is.
Offline
#42 2005-07-29 03:52:09
- ndp
- Member
- Registered: 2005-07-20
- Posts: 12
Re: Plugin: If Section
Thanks els & stuart,
I’ve tried ob1’s plugin as well…same issue. It seems to be a basic textpattern issue for me. And no difference with RC4 now.
I think I’ve come up with a satisfactory plan w/o if_section… but if that changes, I’ll give you guys another yell.
Thanks,
Nate
Offline
Re: Plugin: If Section
Hi,
has this plug-in become obsolete in RC5?
I have read that a native <code><txp:if_section /></code> tag has been implemented in RC5. So, the functionality of this plug-in has been integrated to the TXP core…
And if anybody knows… the new txp tag is as powerful as Remillard’s plug-in?
Remillard, your plugin was my first plug-in in my first TXP installation, and I think this is the most powerful plugin in TXP. Thanks!
Last edited by maniqui (2005-10-31 14:30:34)
Offline
Re: Plugin: If Section
I think the built-in if_section tag can only have 1 section name and it doesn’t support the notsection attribute but you can use the txp:else tag with it.
So you might still need this plugin.
Last edited by tinyfly (2005-08-02 05:28:05)
Refresh Dallas and other Refreshing Cities.
Offline