Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-10-06 06:35:20
- brianlux0r
- Member
- Registered: 2007-06-04
- Posts: 41
if custom_field != null then....
Hi I have added custom fields for my article data, which I would like to display conditionally.
For example, if I have a custom field for a h1 tag for a particular article and I do not fill in the h1 custom field for this article, I would like to abort the display of the html + tag data.
is there a way to translate this into textpattern:
if <txp:custom_field name=“whATever” /> != NULL then display <h1>whatever</h1>
Offline
Re: if custom_field != null then....
or, more general, chh_if_data
Offline
#3 2007-10-06 22:01:23
- brianlux0r
- Member
- Registered: 2007-06-04
- Posts: 41
Re: if custom_field != null then....
so ez.. thanks a lot
Offline
Re: if custom_field != null then....
You actually don’t need the if data plugin
you could achieve what you need just with native tags
<txp:if_custom_field name=“whATever” /><txp:custom_field name=“whATever” /><txp:else /><h1>whatever</h1></txp:if_custom_field>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: if custom_field != null then....
colak wrote:
You actually don’t need the if data plugin
that’s exactly what the if_custom_field link in my post pointed to :) just thought i’d link to chh_if_data aswell, as it comes in handy in a lot of situations and is a more general approach.
Offline
Re: if custom_field != null then....
Hi sven
I like and use the chh_if data plugin too. I just thought that there was no reason for brianlux0r to use it as what he was looking for could be achieved with native tags.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1