00615: Suggested default template changes

Summary: Suggested default template changes
Created: 2005-12-05 18:01
Status: Open
Category: Feature
From: Simon
Assigned:
Priority: 5 X
Version: 2.2 beta
OS: All

Description:

The following template changes are proposed for discussion.
They will make it easier for wiki admins to customise their pages with less changes required to templates etc.

They are changes to the default pmwiki template (/skins/pmwiki/pmwiki.tmpl)

1) Include the pmwiki.css file after the page specific styles

ie in the template

<!--HTMLHeader-->
<link rel='stylesheet' href='$SkinDirUrl/pmwiki.css' type='text/css' />

instead of

<link rel='stylesheet' href='$SkinDirUrl/pmwiki.css' type='text/css' />
<!--HTMLHeader-->

This will allow the styles contained in pmwiki.css to override the inline styles included in the page.

1a) Change the order of statements in HTMLHeeader so that local.css is after the generated include CSS

This will allow the styles contained in local.css to override the inline styles included in the page.

2) Include $DefaultGroup in side bar and wikicmnds
<!--wiki:$Group.SideBar $DefaultGroup.SideBar $SiteGroup.SideBar-->

and

<div id='wikicmds'><!--wiki:$Group.PageActions $DefaultGroup.PageActions $SiteGroup.PageActions-->
3) Page Actions are displayed twice on a page (top right and bottom left), but included into the template using two separate mechanisms
Use the same mechanism (and source) for page actions (see Site.Page actions)

At the bottom of the page replace

<a href='$PageUrl?action=edit'>$[Edit]</a> -
<a href='$PageUrl?action=diff'>$[History]</a> -
<a href='$PageUrl?action=print' target='_blank'>$[Print]</a> -

with

<!--wiki:$Group.PageActions $SiteGroup.PageActions-->

1: I'm afraid I don't quite understand the reasoning for this one -- it's almost always the case that local customizations should be able to override PmWiki's defaults. Which styles do you think pmwiki.css should be overriding...?

Some of these ones:
<style type='text/css'><!--
  ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
  code { white-space: nowrap; }
  .vspace { margin-top:1.33em; }
  .indent { margin-left:40px; }
  .outdent { margin-left:40px; text-indent:-40px; }
  a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
  a.createlink { text-decoration:none; position:relative; top:-0.5em;
    font-weight:bold; font-size:smaller; border-bottom:none; }
  img { border:0px; }
  .apprlink { font-size:smaller; }
  .Pm { color:purple; font-style:italic; }
  .note { color:green; font-style:italic; }

  .pitsfield { text-align:right; font-weight:bold; }
  table.pits th a { text-decoration:none; }
  table.pits th { background-color:#eeeeee; }

  dl.dlcol dt { float:left; padding-right:0.5em; }
  dl.dlcol dd { margin-left:13em; }
.editconflict { color:green; 
  font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }

  table.markup { border: 2px dotted #ccf; width:90%; }
  td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
  td.markup1 { border-bottom: 1px solid #ccf; }
  div.faq { margin-left:2em; }
  div.faq p.question { margin: 1em 0 0.75em -2em; font-weight:bold; }
  div.faq hr { margin-left: -2em; }

    .frame 
      { border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
    .lfloat { float:left; margin-right:0.5em; }
    .rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }
--></style>

2: Including the $DefaultGroup in the set of sidebar pages tends to confuse people; they're surprised when creating Main.SideBar suddenly changes the sidebar for the entire site.

3: This is a pretty good idea; but I'm not sure how to get the hyphens between the items coming from PageActions. At any rate, you're correct that we should probably fix the footer to be more consistent with the header.

Pm


1: This is not a good idea, because you can't overwrite pmwiki standard rules.

Why not, that's exactly what I want to do to customise my PmWiki

3: Maybe it is more consistent, but I would leave it as is, because it is obvious for not so experienced users (with no php and basic html/css knowledge) how to set this links when editing or making an own template.

My experience was the opposite, I struggled to find out why the two both looked different, and where to change them so they were the same

Schlaefer December 07, 2005, at 02:03 AM


3: if you can accept a "|" between the items instead than "-" (like many sites do) here is a solution using CSS:

div.wikicmd ul {
	list-style:none;
	display:inline;
}
div.wikicmd ul li {
	display:inline;
}
div.wikicmd ul li + li {
	display:inline;
	border-left:1px solid #000;
}

Blues December 07, 2005, at 04:23 AM


Simon