[pmwiki-users] patch: tweaks to main wiki theme

Patrick R. Michaud pmichaud at pobox.com
Fri Jul 22 14:27:20 CDT 2005


On Fri, Jul 22, 2005 at 08:05:42PM +0100, Ed W wrote:
> Hi, I was developing a new theme for my site and the default pmwiki 
> template isn't a bad starting point, but it misses a few tags which 
> would be useful for more control over the styling (or perhaps my CSS 
> just isn't good enough...)
> 
> Anyway, the following minor tweaks would be useful in the main theme, 
> and I'm sure there are a couple of other cleanups which others might 
> suggest now that I have broken the ice?

PmWiki's default template may not be the default for much longer --
PITS #00123 has long identified the need for a new default.
In general I think that PmWiki will be distributed with at least two
skins; one will be very simple, to illustrate the basic features of
how a skin works (much like the existing default, perhaps simpler),
the other will be a bit more complex, to provide the common skin
features that many sites want to have available.  I haven't decided
which skin will be the distribution default, but pmwiki.org will be
based on the more complex skin.

Just a few thoughts on the proposed cleanups -- in general I tend to
avoid placing extra <div>'s into my output markup if there's already
a container tag available immediately outside or inside the div.
So, in the cases below...

>   <!--HeaderText-->
> </head>
> <body>
> +<div id='globalwrapper'>

Here I would typically style the <body> tag directly, rather
than add and use a separate div.  (Although I can conceive there might
be a need or desire to have additional margin control beyond the 
margins/padding of the body tag itself.)

> @@ -24,8 +25,9 @@
>         <!--wiki:$Group.SideBar $SiteGroup.SideBar--></td>
> <!--/PageLeftFmt-->
>       <td id='wikibody' valign='top'>
> +        <div id='wikimaincontent'>

Most styles that could be applied to #wikimaincontent here can just
as easily go to #wikibody.  I'm not sure that I know of any that
wouldn't work in this instance.

> <!--PageTitleFmt-->
> -        <table width='100%' cellspacing='0' cellpadding='0' border='0'><tr>
> +        <table id='wikibodynav' width='100%' cellspacing='0' 
> cellpadding='0' border='0'><tr>

Adding id='wikibodynav' is a good idea here, since there's
not an easy way to otherwise get at this table.  (However, in the new 
skin I'm hoping to get rid of this particular table altogether, so... :-)

Thanks!

Pm




More information about the pmwiki-users mailing list