Thursday 29 September 2005 by
One of the newer conditional tags added to Textpattern on the 958 revision – <txp:if_different> – allows to display date based contents in our sites without trouble.
Let say we want to display a date based header into our articles lists, which must be shown only if the day changes from one article to the next one. This can be easily achieved by placing exactly the same code Alex wrote two days ago into our article form:
<txp:if_different>
<!-- heading - only once per day -->
<h3><txp:posted format="%d %B %Y" /></h3>
</txp:if_different>


03 Oct 05
David
12 Oct 05
thomas
Thanks!.
13 Oct 05
Pedro Palazón
This conditionnal tag will really prove useful, thanks ! Another one to add to TextBook :-)
18 Nov 05
Adrianne Curry
But what if you want a monthly view, e.g. all posts under November? Could this be achieved without a plugin? TIA
25 Nov 05
Anton Andreasson