2011-02-19 18:20:50

kemie
Plugin Author
lambda
From: mexico<-->sweden
Known languages: en, es, sv
Website

Re: smd_parent: grab parents up the tree from any category

Shame on you for providing tardy (and FREE) support for your wonderful (and FREE) plugin :).
Your fix seems to work perfectly. I didn’t do any extensive testing either, but it works in my case.
I guess it was a question of me misunderstanding the “level” variable, but I do think the change is a welcome one in any case.

Thank you so much! :)


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

 

2011-03-23 16:15:03

johnstephens
Plugin Author
xi
Real name: John Stephens
From: Harrisonburg, VA
Website

Re: smd_parent: grab parents up the tree from any category

Is there any way to test the parent for multiple values? I currently have something like this:

<txp:variable name="parent_topic"><txp:smd_parent/></txp:variable>
[...]
<txp:if_variable name="parent_topic" value="x">Do this.</txp:if_variable>

I want to “Do this” if the parent category is X, Y, or Z, which I could enter as a comma-separated list. But if I’m not mistaken, if_variable can’t test for multiple values as of TXP 4.3.0.

Offline

 

2011-03-23 16:17:50

Bloke
Developer
omega
Real name: Stef Dawson
From: Leeds, UK
Known languages: Engl(ish)
Website

Re: smd_parent: grab parents up the tree from any category

johnstephens wrote:

Is there any way to test the parent for multiple values?

Not natively. smd_if’s in operator is probably your best bet. smd_multi_select is overkill.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

 

2011-03-23 16:21:11

johnstephens
Plugin Author
xi
Real name: John Stephens
From: Harrisonburg, VA
Website

Re: smd_parent: grab parents up the tree from any category

Thanks, Stef! I suspected smd_if might be the only way, but I thought I could get away with not installing another plugin. I’ll do it!

Offline

 

Powered by FluxBB