Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Occurrences in a "yield" tag
Is it possible (and how) to verify different occurrences into a single conditional yield tag?
For compatibility with a previous short code, I need verify two occurrences into the new one.
The pipe sign seems not working:
<txp:if_yield name"old|new">
...do something wired...
</txp:if_yield>
🤔 💭
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Occurrences in a "yield" tag
Do you need both occurrences to be true? If so try
<txp:if_yield name="old">
<txp:if_yield name="new">
...do something wired...
</txp:if_yield>
</txp:if_yield>
if only one occurrence is enough, you may need to call the yield twice.
<txp:if_yield name="old">
...do something wired...
</txp:if_yield>
<txp:if_yield name="new">
...do something wired...
</txp:if_yield>
Edited to add that there appears to be a typo in your snippet. If the pipe works, it should be
<txp:if_yield name="old|new">
...do something wired...
</txp:if_yield>
Last edited by colak (Today 07:53:05)
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