Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-16 17:57:15

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

txp:thm_if_article tag not working consistantly

I’m trying to setup a 4 pseudo static pages in one section template.

Each Page needs a different header image.

I’m using thm_if_article plugin because it seems be the only conditional tag that enables me to link a block of code to an article ID. The problem is it’s only working for two of the four IDs?

<txp:thm_if_article article="78">
    <img src="<txp:output_form form="my_site_url" />img/header-image5.jpg" alt="Mum and son" width="650" height="171" />
</txp:thm_if_article>
<txp:thm_if_article article="79">
    <img src="<txp:output_form form="my_site_url" />img/header-image6.jpg" alt="Dad and daughter" width="650" height="171" />
</txp:thm_if_article>  
....  etc.

e.g. The first one fails and the second works fine???

This plugin is pretty old autum 2005 could that be it. Is there a better way to achieve this? I’m open to suggestions

edit: BTW the code is in the page template not in a form.

Last edited by Timid&friendly (2008-04-16 18:05:12)


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

Offline

#2 2008-04-16 19:39:56

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: txp:thm_if_article tag not working consistantly

I think there is tag for textpattern: <txp:if_article_id id=”##”>


<txp:Ruhh />

Offline

#3 2008-04-16 20:01:31

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

Re: txp:thm_if_article tag not working consistantly

Offline

#4 2008-04-18 18:34:12

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

Re: txp:thm_if_article tag not working consistantly

Hey Els, Ruhh,

I just wanted to thank you for your help and patience. It’s very embarrassing but i really did look??? but your link helped me to get things working.

For reference … for other noobs like me, I needed to place the conditional tag within the another conditional tag <txp:if_individual_article> because i was using them in the page template.

There also seems to be some ambiguity in textbook as to weather the id integer needs to be placed between quotation marks or not. I used quotation marks …. well cos it looks nicerer

Last edited by Timid&friendly (2008-04-18 18:37:21)


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

Offline

Board footer

Powered by FluxBB