[pmwiki-users] FAQ broken in latest upgrade

Patrick R. Michaud pmichaud at pobox.com
Fri Jun 9 17:35:39 CDT 2006


On Fri, Jun 09, 2006 at 08:22:24PM +0100, Marc Cooper wrote:
> Patrick R. Michaud said...
> > On Fri, Jun 09, 2006 at 03:21:38PM +0100, Marc Cooper wrote:
> > > I just applied v2.1.10 to v.2.1.7 and noticed that the FAQ is broken.
> > 
> > Could you give a specific example of what is "broken"?
> 
>     http://www.pmwiki.org/wiki/PmWiki/FAQ?skin=notsosimple
> 
> Ugh!

This is a case where I'm going to blame the skin and not PmWiki.
Frankly, IMO the notsosimple skin is not well designed from a CSS
perspective -- it forces tables to be 100% width and sets zero
margins on headings (and there are several other items I disagree 
with).  So, the fact that the headings don't render well in this 
particular page I see as a skin flaw and not a PmWiki flaw.

(I've often wanted to rewrite NotSoSimple so that it has an identical
look while using a more straightforward CSS and being more compatible
with the way PmWiki expects skins to act... just haven't had time
to do it.)

> But also see:
> 
> http://www.pmwiki.org/wiki/PmWiki/FAQ?skin=gemini
> http://www.pmwiki.org/wiki/PmWiki/FAQ?skin=soma
> http://www.pmwiki.org/wiki/PmWiki/FAQ?skin=monobook

The headings in soma definitely look odd, but monobook and gemini 
both look okay to me -- what in particular do you not like about those?  
Is it the fact that some headings have links and therefore are
not in the same typography as the non-linked headings?  

Again, I'd point to that as being a skin decision and not
a PmWiki one.  I just can't see it as "abnormal" in the web
that a heading might contain a link to another place.

> I've had a little more time to explore the root of the problem and it 
> sits with the inbuilt >>faq<< wikistyle and pagelist #includefaq format. 
> I've tidied the div.faq - by adding them to local.css - but I'm stymied 
> on the "headings" generated by
> 
> (:pagelist trail=PmWiki.DocumentationIndex "[[#faq]]" fmt=#includefaq:)
> 
> because they don't have a consistent class with which to reference the 
> "wikilink"s - not that this is ideal.

Sure they do.  Just use a selector like

    div.fpltemplate h2 { ... }

and you'll get all of the <h2> tags within a templated pagelist.  
Or, if you really want to be more specific, use a selector of

    div.fpltemplate h2 a.wikilink { ... }

which grabs just the links to pages within headings within a templated
pagelist.  Or, change the class of the pagelist itself, with
(on one line):

    (:pagelist trail=PmWiki.DocumentationIndex "[[#faq]]" 
       fmt=#includefaq class='faqlist':)

and then one can get the h2 headings within this particular
pagelist by using

    div.faqlist h2 { ... }

But to be completely frank, if you think headings with links
should look exactly the same as headings without links, then
the skin should be setting its heading CSS styles by using

    h2, h2 a { ... }

so that links in headings have the same properties as
the non-linked form.  (If you're wondering why a simple 'h2'
selector isn't sufficient, it's because the properties defined
on <a> elements is considered to have higher priority than
any inherited properties from the surrounding <h2> element.)

At any rate, I'm not convinced that PmWiki is broken here.  From
a content and organizational perspective, I think it makes
perfect sense that the questions of the faq be organized by
topic, and that the heading for each topic be a link to the
page that best describes that particular topic.

And even with all of the above, I'm not at all adverse to adding
a default class='...' parameter to the (:pagelist:) markup
in PmWiki.FAQ, or adjusting the #includefaq template to
add more classes to the output, if it'll make things
substantially easier to style.  But I think we should also
consider the issue from the "entire site/skin" perspective,
as opposed to trying to just fix the faq.

Thanks,

Pm




More information about the pmwiki-users mailing list