Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-01-08 00:19:57

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,933
Website GitHub

Re: if_article_id on article-list context

Sadly no. When it returns nothing, it actually returns nothing : not false, not true

Ah right. Thanks for the info.

Ruud wrote

On individual article pages (permlink) the ID is set by default to the ID of that article which makes it evaluate to TRUE. I’m not quite sure how that’s useful though.

Bloke wrote

No? Perhaps it’s a tad esoteric? (and untested, so it might not work)

In other words much like rvm_if_this_article :-)


TXP Builders – finely-crafted code, design and txp

Offline

#14 2009-01-08 00:21:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,816
Website GitHub

Re: if_article_id on article-list context

jakob wrote:

In other words much like rvm_if_this_article

Uhhh, yeah! Except that plugin is only 3 lines long, and probably a much neater solution than the hacky crap I posted off the top of my head :-)

Last edited by Bloke (2009-01-08 00:22:17)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#15 2009-01-08 07:39:27

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: if_article_id on article-list context

Stef, I vaguely remember creating rvm_if_this_article, because if_article_id didn’t work like that in list context (article_custom is also an article list, which temporarily overrides the $thisarticle array set for the individual article page). Or because if_article_id didn’t exist at the time.

Last edited by ruud (2009-01-08 08:34:45)

Offline

Board footer

Powered by FluxBB