Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if_different usage
Hello,
I can’t grasp the meaning and usage of if_different
.
Mainly, does it check whether any txp:tag
contained therein has different value from the same istance of the previous txp:tag
?
thanks…
Offline
Re: if_different usage
Close. It checks the value of its contents.
<txp:if_different><txp:posted format="%Y" /></txp:if_different>
If the above code is in an article form, the first article will cause the code to show the year the article was posted. Subsequent articles will not output the code if they were posted in the same year as the first. When an article with a different year comes through the form, the year will be shown again. That resets the “if_different” stack and subsequent articles will compare against the new value.
Code is topiary
Offline
Pages: 1