Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: <txp:mdm_if_category>
apo,
Works fine for me now, it was probably just a temporary down period.
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: <txp:mdm_if_category>
What about category heirarchy? I want to show/hide content but it could be any of a list of subcategories. Could some conditions be added for the parent/child relationship of categories?
Like say I have
- Cat1
- CatA
- CatB
- Cat2
I want to do the condition for if the category is any child of Cat1, but not nesessarily in Cat1 itself.
Thanks.
Rayne
Last edited by rayne (2004-12-01 21:44:03)
Rayne
mama love
Offline
Re: <txp:mdm_if_category>
Never mind. I reworked the categories so that I don’t have to do this.
Rayne
mama love
Offline
Re: <txp:mdm_if_category>
Hello,
I have 2 categories ‘Incidentals’ and ‘Miscellaneous’ which are both in a section called ‘Meanderings’. I have page titles for all my sections that are called by CSS on the body tag.
On my ‘Meanderings’ page template I use txp:mdm_if_category like this…
<txp:mdm_if_category category="incidentals">
<body id="incidentals">
</txp:mdm_if_category>
<br />
<txp:mdm_if_category category="Miscellaneous">
<body id="meanderings">
</txp:mdm_if_category>
This works fine until I try to view an article and the title disappears. Can anyone suggest a workaround for this? – other than have a separate section for one of my categories.
Cheers
Last edited by Martagnan (2004-12-02 09:47:35)
Offline
Re: <txp:mdm_if_category>
this is exactly what I’ve been looking for … thanks man!!!!!
Offline
Re: <txp:mdm_if_category>
This plugin is great – thanks!
However I have a problem. I’m trying display some text only if the current category is not matched. This works fine, but the text also appears even if there is no category being viewed at all.
This is my code:
<txp:mdm_if_category category="!my category"> my text </txp:mdm_if_category>
I’d like it if this worked only if there was a category in use. Any suggestions?
Forget your dreams
Offline
#43 2004-12-18 21:34:16
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: <txp:mdm_if_category>
If you don’t have too many categories, you could use something like this: category=“Category1,Category2,Category4”, thus excluding Category3.
Offline
Re: <txp:mdm_if_category>
Thanks doggiez, but I need this to work without manually having to enter all my categories.
I’ve managed to hack the plug-in now so it works.
Forget your dreams
Offline
Re: <txp:mdm_if_category>
Thanks a lot for this plugin. I’m with Case though, I wish it would just know what category is being displayed so I wouldn’t have like 12 copies of a whole bunch of code.
Offline
Re: <txp:mdm_if_category>
I tried updating to the “current stable” (RC2) version of TXP and the only plugin that broke was mdm_if_category.
It looks like the if_category tag is just not being read at all because my pages are displaying all of the content no matter what category I’m on. Yes, I made sure the plugin was active.
I sure hope that this get’s fixed before 1.0 final. < fingers:crossed >
Offline
Re: <txp:mdm_if_category>
I installed the 0.4 version of mdm_if_category, and it doesn’t seem to work. Any content included between the tags simply doesn’t appear – even if I take out the category=”…” specification. Any ideas?
Offline
Re: <txp:mdm_if_category>
> paularms wrote:
> Thanks a lot for this plugin. I’m with Case though, I wish it would just know what category is being displayed so I wouldn’t have like 12 copies of a whole bunch of code.
Okay, I’m that was just poor knowledge of TXP
lwray: are you sure the plugin is turned on? Also, it only works on category pages, not article or section frontpages, so if you go to yoursite.com/?c=categoryname then it should work.
Last edited by paularms (2005-01-22 05:28:17)
Offline