Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-07-14 15:21:54
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
if_first_article inside if_different
hello, I’m trying to make an article list to wrap all articles posted on the same date inside a div like this:
<txp:if_different>
<txp:if_first_article>
<div class="dailyTopLinks">
<txp:else />
</div>
</div>
<div class="dailyTopLinks">
</txp:if_first_article>
<div class="toplinksDate">
<txp:posted format="%e %b %Y" gmt="0" />
</div>
<div class="linkScroller">
</txp:if_different>
<div class="box">
. . .
</div>
<txp:if_last_article>
</div>
</div>
</txp:if_last_article>
in short: if the date differs and the article is the first of the list we should output: <div class="dailyTopLinks">
otherwise a </div></div><div class="dailyTopLinks">
before any further change in the date.
for some reason, though, the if_first_article
seems to isolate the first article reevaluating the date on the second article of the list (i mean: like the first and the second had a different date which is not the case).
does anybody know why that happens? I thought that since the if_first_article
is inside the if_different
it wouldn’t interfere with the parsing…
thank you
Last edited by feragnoli (2007-07-14 15:22:24)
what was that again…?
Offline
Re: if_first_article inside if_different
Because if_first_article creates different output for the first article compared to the articles that follow, the contents of the if_different gag is different for the second article (compared to the first), so if_different shows the date again.
Offline
Pages: 1