Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-02-08 13:44:57

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: <txp:if_article_category> not recognising category

Timid&friendly wrote:

I don’t understand why that would work anyway. Custom_3_set is not called “custom_3” but is called “Aanverwante_links_volgorde”? I am confused.

Have a look in phpMyAdmin: the column is still called ‘custom_3’.

Offline

#14 2009-02-08 18:49:27

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: <txp:if_article_category> not recognising category

@jstubbs
That worked! Much simpler than my approach with asy_wondertag. Thx very much.

@Wet
Thx wet, tried using asy_wondertag but i just couldn’t get it to work? Still don’t understand why as i have successfully used the plugin in the past :-?

@Els
Out pure nerdy curiosity and the desire to learn, went and had a nose around to see what i could see, and by golly i saw…
… but allas I didn’t understand, I don’t see anywhere the column custom_3 and yet it works. You are of course right but i don’t see it. ^^ <zucht>

I still have soooooo much to learn. Thx again all of you.

Last edited by Timid&friendly (2009-02-08 18:50:29)


I think, therefore I AM, … … er … I think :-?

Offline

#15 2009-02-08 20:03:47

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: <txp:if_article_category> not recognising category

David, you have to look in the textpattern table (sorry I didn’t mention that right away). The articles are stored in and pulled from there, so the sorting has to be based on columns in that table.

Offline

#16 2010-06-30 19:23:55

fantasmo
Member
Registered: 2010-05-05
Posts: 40

Re: <txp:if_article_category> not recognising category

Hi, how can I write multiple if_article_category cases?

I tried to write different IFs with each an ELSE inside, like:
<txp:if_article_category name="flowers"> <p>Here will be a special header image for flowers</p> </txp:else> <p>General header for everything else, like about page, contact page, etc.</p> </txp:if_article_category> <txp:if_article_category name="animals"> <p>Here will be a special header image for animals</p> </txp:else> <p>General header for everything else, like about page, contact page, etc.</p> </txp:if_article_category>

And a second try was, writing IFs for each case, but in the last case writing no name=“category”:
<txp:if_article_category name="flowers"> <p>Here will be a special header image for flowers</p> </txp:if_article_category> <txp:if_article_category name="animals"> <p>Here will be a special header image for animals</p> </txp:if_article_category> <txp:if_article_category> <p>General header for everything else, like about page, contact page, etc.</p> </txp:if_article_category>

That didn’t work:-(

How is it possible to make multiple IFs with ONE CASE that should happen when none of the IF-condition is met?

Offline

#17 2010-06-30 19:46:35

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: <txp:if_article_category> not recognising category

fantasmo wrote:

Hi, how can I write multiple if_article_category cases?

As with so many Txp problems, first thing to ask is, has Bloke written a plugin for this?

http://forum.textpattern.com/viewtopic.php?id=30376


Code is topiary

Offline

#18 2010-06-30 19:47:49

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: <txp:if_article_category> not recognising category

<txp:if_article_category name="flowers">
	<p>Here will be a special header image for flowers</p>
</txp:else>
	<txp:if_article_category name="animals">
		<p>Here will be a special header image for animals</p>
	<txp:else />
		<txp:if_category name="yetanothercategory">
			<p>Here will be a special header image for yet another category</p>
		<txp:else />
			<p>General header for everything else, like about page, contact page, etc.</p>
		</txp:if_article_category>
	</txp:if_article_category>
</txp:if_article_category>

Offline

Board footer

Powered by FluxBB