Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Article_custom - if 1 of 3 custom fields exist
Hey!
I have a article_custom and I want to limit it to 3 custom fields if one of them exist.
regularly if it’s only one cusom field, then I use the customfieldname="value"
attribute.
Yes I can do it messy as:
<txp:article_custom section="section-name">
<txp:if_custom_field name="bla1">
<txp:article_custom section="section-name" bla1="value" />
<txp:else />
<txp:if_custom_field name="bla2">
<txp:article_custom section="section-name" bla2="value" />
<txp:else />
<txp:article_custom section="section-name" bla3="value" />
</txp:if_custom_field>
</txp:if_custom_field>
</txp:article_custom>
but is there a better way to do this please?
(maybe using txp:variable or something?)
Offline
Offline