[pmwiki-users] Ugly markup in pagelist

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 9 09:54:14 CDT 2006


On Mon, Oct 09, 2006 at 01:15:12PM +0200, Lothar B. Baier wrote:
> I'm preparing the launch of a new wiki for my hometown. By preparing 
> some categories I found that pagelist with list=normal produces some 
> unnessecary markup.
> 
> Instead of:
> dl - dt - Group - dt - dd - Page - dd - dl
> 
> it produces markup like this:
> dl - dt - Group - dt - dd - dd - dt - dt - dd - Page - dd - dl
> 
> how can I change this?

Short answer:  You can change the default output format by creating
a new [[#default]] template in Site.LocalTemplates .  See
Site.PageListTemplates for the current default.


Longer answer:  For better or worse, the default pagelist template
uses a definition list as the markup for listing pages by group,
with the group name as the "term to be defined" and the pagenames as
the "definitions".  Yes, it's semantically very wrong, but it's
also been this way for so long that we aren't likely to change it.

So, the group name ends up being a term without a definition,
and each page name ends up being a definition without a term,
and you end up seeing the extra empty <dd></dd> and <dt></dt>
tags in the output.  And it's not entirely straightforward to
eliminate these, as XHTML requires that every <dt> have a corresponding
<dd> (or else the document won't validate).

Pm




More information about the pmwiki-users mailing list