Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2004-11-16 19:06:01

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

#38 2004-12-01 21:42:32

rayne
Member
From: AL USA
Registered: 2004-03-24
Posts: 58
Website

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

#39 2004-12-01 22:16:37

rayne
Member
From: AL USA
Registered: 2004-03-24
Posts: 58
Website

Re: <txp:mdm_if_category>

Never mind. I reworked the categories so that I don’t have to do this.


Rayne
mama love

Offline

#40 2004-12-02 09:46:28

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

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

#41 2004-12-06 16:46:35

ddsoul
New Member
From: Vancouver, BC
Registered: 2004-12-03
Posts: 5
Website

Re: <txp:mdm_if_category>

this is exactly what I’ve been looking for … thanks man!!!!!

Offline

#42 2004-12-16 16:38:00

Case
Member
From: UK
Registered: 2004-02-25
Posts: 20
Website

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

#44 2004-12-18 23:07:32

Case
Member
From: UK
Registered: 2004-02-25
Posts: 20
Website

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

#45 2005-01-02 18:58:36

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

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

#46 2005-01-13 13:01:50

qrayg
Member
From: USA
Registered: 2004-08-27
Posts: 81
Website

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

#47 2005-01-22 05:17:55

lwray
Member
From: Allston, MA
Registered: 2004-12-02
Posts: 21
Website

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

#48 2005-01-22 05:27:22

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

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

Board footer

Powered by FluxBB