Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Can I test for presence of keywords?
I don’t see a conditional tag available for keywords (like <txp:if_keywords>) as there is for, say, custom fields. Is there some php I could use to achieve the same result? In other words, if there are keywords, output them, if not, output something else?
Thanks.
Offline
#2 2008-10-06 18:19:41
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can I test for presence of keywords?
Strange, I could have sworn if_keywords existed… but it only seems to exist in crockery. Well, there is always chh_if_data :)
Offline
Re: Can I test for presence of keywords?
Oh, brilliant! Thanks!
Offline
Re: Can I test for presence of keywords?
<txp:if_keywords> was introduced in the development version of TXP after the release of TXP 4.0.6, so it’s likely to be a part of the TXP 4.0.7 version.
Offline
#5 2008-10-06 18:56:35
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can I test for presence of keywords?
ruud wrote:
<txp:if_keywords> was introduced in the development version of TXP after the release of TXP 4.0.6, so it’s likely to be a part of the TXP 4.0.7 version.
Oh nice! But I searched the code and it was only found in taghandlers.php in crockery…
Offline
Re: Can I test for presence of keywords?
I checked the 4.0 development files I have here on my own server. It’s there. Really! :)
Offline
#7 2008-10-06 19:14:14
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can I test for presence of keywords?
I believe you :) It was this search that made me think it was only in crockery, I didn’t look any further.
Offline
#8 2008-10-07 00:47:03
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Can I test for presence of keywords?
If all else fails ras_if_article_keywords is compatible back to 4.0.4 as a plugin.
Offline
Pages: 1