[pmwiki-users] PageListTemplates variable naming... Was: PageListTemplates recipe extended

Martin Fick fick at fgm.com
Thu Oct 27 15:54:04 CDT 2005


> >   I'm not sure I like the 'Page' prefix, but 'Cur' just
> > seems lame.  Any other suggestions?  Is there any reason to
> > keep the stict namespace separation with the 'PageList'
> > prefix, or is it simply overkill?
> 
> I think, the variable names should point unique towards the cookbook.
> My preferred solution would be $PageList.Curr.xyz, $PageList.Prev.xyz
> $PageList.Next.xyz or maybe $PL.Curr.xyz, $PL.Pref.xyz, $PL.Next.xyz.


Hmm, 

$PageList.Curr.xy 

does not seem like much of a simplification.



$PL.Curr.xyz 

is certainly shorter.  It is something I would use. :)
But I would be concerned that it is not obvious to authors
who are not aware of the recipe.



  One reason I was just thinking of eliminating the
'$Pagelist' prefix is that I can imagine other recipes using
the same notations for page data.  For example I have a
script which takes a trail and includes all the pages listed
in the trail on one page, this could be reimplemented using
the same notation as PageListTemplate allowing easier
customization of the layout.  In this case the prefix would
actually not just be a hinderance, but actually misleading
and would prevent recepies from sharing layout templates.

  Can anyone picture more recipes that need similar
functionaliy? If people use it for their search results,
should the vars now be prefixed with 'SearchResults'?  Are
there other core pieces of pmwiki that could be enhanced to
work similarly?


  -Martin




More information about the pmwiki-users mailing list