[pmwiki-devel] Cluster & skin integration

Hans design5 at softflow.co.uk
Sun Mar 18 04:09:53 CDT 2007


Hi Kathryn,

Hope you don't mind this as an open letter on the devel list!
We may get some clever answers from others this way.

Prompted by comments on the Triad-Comments page and the Cluster page
by Feral I started working on Triad to provide a flexible way of
creating different title bars, and to integrate Cluster support right
into the skin template, by default.

The latter is easy enough with adding extra page variables.

And for changing the titlebar section I am adding a Site.TitleBar page,
acting as a subpage.

But I would like to use more descriptive PV names for the Cluster PVs
inside the skin template. So instead of {$SideBar} etc I like to use
{$ClusterSideBar} and {$ClusterRightBar}.
And I like to extend this to all subpages called, so I need
{$ClusterTitleBar}, {$ClusterPageHeader}, {$ClusterPageTopMenu},
etc. (there are more!).

My questions are:
1. Could you support such naming scheme in Cluster?

2. Would it be possible to change the function code in Cluster so you
   got just one function processing an array of names, instead of a
   series of unctions, each called by a Cluster subpage PV?

   If yes a skin could provide an array of subpage variables, and
   Cluster can process these. Then Cluster does not need to keep a
   perhaps growing list of subpage PV functions.

3. From having played with Cluster I would like a
   $EnableBreadCrumbPageName var in Cluster by which I can optionally
   disable the addition of the page name to the breadcrumb trail,
   i.e. change the last part of the code perhaps to

if ($EnableBreadCrumbPageName==1 && $name != $DefaultName && $name != $group)
  {
    $out .= " $ClusterBreadCrumbSeparator ";
    $out .= "'''" . '[[{*$Namespaced}]]' . "'''";
  }
  return $out;

  I like to avoid duplication of the page name/title. But have it
  optionally.

4. I find {$BreadCrumb} a strange choice. {$ClusterGroups) or
   {$ClusterGroupLinks} would say a lot more to me and make the
   association with the recipe very clear. Even {$Cluster} on its own.

5. I wonder if I should put into the new Site.TitleBar page for Triad
   as default a switch to load the Cluster group links - Bread crumbs:

   >>pagegroup<<
   (:if enabled {$BreadCrumb}:){*$BreadCrumb}(:else:)[[{*$Group}/]]
   >>pagetitle center<<
   ![[{*$FullName}?action=browse|{*$Titlespaced}]]
   >><<

This would make cluster work out of the box with Triad, avoiding
skin hacks or Cluster hacks. This is really my ideal of module
integration for PmWiki. And I think with a little effort we can
achieve this for Cluster and Triad for a start.

Another thought when playing with cluster was that it would be nice to
switch off the ? and dots.... under group links to non existent group
homepages. But I see this  as a skin modification, and will add this
to Triad, so that group links in the titlebar have ? and ... removed
and look decent.

What are your thoughts on this? Or anyone else's?


Cheers,
 Hans




More information about the pmwiki-devel mailing list