Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Generating a HTML site map
I also use a DL-list for my archive page(s) using the same if_different principle. I sometimes also show it on the 404 page for added where-to-go-from-here help.
Getting sticky and live articles to show together is still a problem, though, as status="live,sticky" is no longer possible. I’ve only managed this by hacking this facility back into the core. The traditional method of calling txp:article_custom twice with status="sticky" and a second time with status="live" in combination with txp:if_different results in duplicate section headings, effectively a sitemap of sticky articles and a sitemap of live articles.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Generating a HTML site map
I just tested both in a plain page with no styles, in Safari and Lynx (a plain text browser). In both cases I think the relationship is slightly more clear using the improperly nested header element, but not by a meaningful degree. I have to confess, that according to W3, this is a semantically valid use of the dl element; check out their recipe example. In this case, the h3 / dt’s implied meaning is “contents of Section x,” which corresponds to “ingredients,” but it still looks like a nested unordered list would be more correct that several dts.
I would conclude that for this purpose, the dl markup above is the best available option. But I would put the strong tags inside the dt.
Last edited by johnstephens (2008-09-17 18:43:51)
Offline
#33 2008-09-17 20:09:49
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Generating a HTML site map
Now here’s a challenge: how to create a list like this with if_different :)
<dl>
<dt><strong>The ingredients:</strong></dt>
<dd>
<ul>
<li>100 g. flour</li>
<li>10 g. sugar</li>
<li>1 cup water</li>
<li>2 eggs</li>
<li>salt, pepper</li>
</ul>
</dd>
<dt><strong>The procedure:</strong></dt>
<dd>
<ol>
<li>Mix dry ingredients thoroughly.</li>
<li>Pour in wet ingredients.</li>
<li>Mix for 10 minutes.</li>
<li>Bake for one hour at 300 degrees.</li>
</ol>
</dd>
<dt><strong>Notes:</strong></dt>
<dd>The recipe may be improved by adding raisins.</dd>
</dl>
Offline
Re: Generating a HTML site map
I wanted to bump this since Els posted an elegant solution to this problem on the TXP Tips site.
I added a second section_list for site utilities, but I’m very happy with the results!
Thanks!
Offline