Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Check 2 variables at once with if_variable - possible?
Hi there,
I know this code works…
<txp:if_variable name="--contact-map-latitude" not value="">
<span class="geo">
<meta class="latitude" content="<txp:variable name="--contact-map-latitude" />">
<meta class="longitude" content="<txp:variable name="--contact-map-longitude" />">
</span>
</if_variable>
But can I check two variables are not empty at the same time? For example, the equivalent of this (not working) code…
<txp:if_variable name="--contact-map-latitude,--contact-map-longitude" not value="">
<span class="geo">
<meta class="latitude" content="<txp:variable name="--contact-map-latitude" />">
<meta class="longitude" content="<txp:variable name="--contact-map-longitude" />">
</span>
</txp:if_variable>
Offline
Re: [SOLVED] Check 2 variables at once with if_variable - possible?
I know it is the old way, but did you try nesting them?
<txp:if_variable name="--contact-map-latitude">
<txp:if_variable name="--contact-map-longitude">
<span class="geo">
<meta class="latitude" content="<txp:variable name="--contact-map-latitude" />">
<meta class="longitude" content="<txp:variable name="--contact-map-longitude" />">
</span>
</txp:if_variable>
</txp:if_variable>
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: [SOLVED] Check 2 variables at once with if_variable - possible?
Thanks Yiannis, that did the trick!
Offline