Hi,
I created a sitemap using the method described here:
http://wiki.radiantcms.org/How_To_Make_a_Sitemap
I've been very happy with the result. But recently I started cleaning
up my xhtml to make it validate, and I find that there is a problem
with the sitemap page. The sitemapper snippet creates a <ul> whether
or not the current page has children. A <ul> with no <li> children
does not pass the w3c validation (I'm on XHTML 1.0 strict).
I propose that modifying the sitemapper snippet along the following
lines would fix this:
<r:children:each by="title" order="asc">
<r:unless_content part="no-map">
<li>
<r:link />
<r:has_child>
<ul>
<r:snippet name="sitemapper" />
</ul>
</r:has_child>
</li>
</r:unless_content>
</r:children:each>
The block inside <r:has_child> would only render if the current page
had one or more child pages with status=published.
Currently, there is no tag equivalent to <r:has_child>, as far as I
know. There are tags <r:parent /> and <r:unless_parent />. If such a
tag was to be created, it would probably be useful to create its
opposite as well, e.g <r:has_no_child> or <r:childless>. (Any
thoughts as to how the pair of tags should be named?)
Should I create a trac ticket for this? Or am I missing something?
Cheers,
Andrew
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant