Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-08-11 20:35:50

jeeves
Member
Registered: 2004-06-14
Posts: 31

Getting mdm_if_category to work

This is an incredibly useful plugin, I just have not been able to figure out how to get it to work for me. <strong>When I wrap something with this tag Texpattern does not output anything at all.</strong>

Here is how I am using it:
<code>
<txp:mdm_if_category category=“Alpha”>
<txp:article form=“faq_article” listform=“faq_list” limit=“100” />
</txp:mdm_if_category>
</code>

Now I verified that I have articles assigned to the <strong>category=“Alpha”</strong> and to the section I am displaying. Yet Textpattern is not displaying anything.

Is there something I am missing here? Is there something I forget to do to make <strong>mdm_if_category</strong> work?

Offline

#2 2004-08-11 21:47:40

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: Getting mdm_if_category to work

Look in your Plugins tab – Is it “activated” ?

Offline

#3 2004-08-11 22:06:40

jeeves
Member
Registered: 2004-06-14
Posts: 31

Re: Getting mdm_if_category to work

I checked. “mdm_if_category” is definitely set to “yes” in the Active column.

Last edited by jeeves (2004-08-11 22:13:49)

Offline

#4 2004-08-11 23:52:11

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

Re: Getting mdm_if_category to work

is your URL pointing to the Alpha category?
http://www.domain.com/section/?c=Alpha


Listen to Kenneth

Offline

#5 2004-08-12 03:51:10

jeeves
Member
Registered: 2004-06-14
Posts: 31

Re: Getting mdm_if_category to work

No such luck. I made sure “?c=Alpha” was at the end of the address, and it still does not work.

Offline

#6 2004-08-12 18:25:42

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

Re: Getting mdm_if_category to work

where are you using it? form? template? (heaven-forbid) article?

it should, of course, be in one of the first two.

Last edited by kennethlove666 (2004-08-12 18:26:02)


Listen to Kenneth

Offline

#7 2004-10-27 15:30:03

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: Getting mdm_if_category to work

is there something like this that could be used in an article form?


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#8 2004-11-21 04:05:55

nishark
New Member
From: Melbourne, Australia
Registered: 2004-06-02
Posts: 9
Website

Re: Getting mdm_if_category to work

I am running into similar problems

I am using it from a form

Each article uses a ‘page’ called ‘archive’.

An ‘archive’ page has the following:
<code><txp:article form=“Single” /></code>

The ‘Single’ form has the following:
<code>
<txp:permlink><txp:title /></txp:permlink>
<txp:posted /><txp:category1 />
<txp:mdm_if_category category=“books”>
category works
</txp:mdm_if_category>
<txp:body />
</code>

When I visit say <code>http://localhost/article/28/this-is-an-article</code>, I don’t see the ‘category works’ message. But if I visit <code>http://localhost/article/28/this-is-an-article?c=books</code>, the ‘category works’ message is displayed. In both cases <code><txp:category1 /></code> displays the expected output.

What am I doing wrong?

My intention is to have a few <code><txp:mdm_if_category></code> checks in the ‘Single’ form, and display customised content depending on the current category that the article belongs to.

TIA

Last edited by nishark (2004-11-21 04:09:30)

Offline

#9 2004-11-21 06:31:13

nishark
New Member
From: Melbourne, Australia
Registered: 2004-06-02
Posts: 9
Website

Re: Getting mdm_if_category to work

ok, I got this to work by changing the plugin a bit.

I changed line 11 of the mdm_if_category plugin from
<code>
$curr_cat = gps(“c”);
</code>

to

<code>
$curr_cat = parse(“<txp:category1 />”);
</code>

Offline

Board footer

Powered by FluxBB