Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-07-20 20:11:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: archive Expand/Collapse months
How should the wrapping work, exactly? Pretend this functionality were in place, and show an example: what would the tag look like and what would the output look like?
Offline
Re: archive Expand/Collapse months
Mary,
I had this in mind:
<code>
<!— show the year —>
<txp:if_different>
<h2 class=“year”><txp:posted format=”%Y” /></h2>
</txp:if_different>
<!— show the month (NOTE THE ADDED WRAP TAG —>
<txp:if_different wraptag=“div” wrapclass=“month”>
<h3><txp:posted format=”%B” /></h3>
</txp:if_different>
<!— article title and link —>
<a href=”<txp:permlink />”><txp:title /></a>
</code>
With the effect that everything that is a child of that heading (month in this case) will be wrapped overall in a div class=“month” tag.
Like so:
<code>
<h2 class=“year”><txp:posted format=”%Y” /></h2>
<div class=“month”>
<h3>May</h3>
<a href=“some article”>some title</a>
<a href=“some article”>some title</a>
<a href=“some article”>some title</a>
<a href=“some article”>some title</a>
<a href=“some article”>some title</a>
<a href=“some article”>some title</a>
</div>
</code>
Hopefully that makes sense.
Perhapse there are better ideas out there, but that’s what I had in mind.
:)
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline