[pmwiki-users] PageListTemplates recipe extended
Daniel Scheibler
scheibi at gmail.com
Thu Oct 27 02:04:23 CDT 2005
Hello,
2005/10/26, Martin Fick <fick at fgm.com>:
> > The updated recipe is available at
> > http://www.pmwiki.org/wiki/Cookbook/PageListTemplates
>
> I have updated it again slightly so that the new variables
> you have added are loaded on demand if they are not set
> already. I have been meaning to add every variable that I
> can think of, the on demand stuff was holding me back a
> little.
superb.
> Since it is now ready for more variables, I have a naming
> question. It seems like the variable names might be too long
> and hard to remember/type. If I add more, this risks
> getting even worse, any ideas/suggestions on this?
>
> I was thinking of dishing the 'PageList' prefix in favor
> of 'Page', 'Prev', 'Next', 'Is' and 'Count' like this:
>
>
> Current Name Suggested New Name
>
> {$PageList.Name} {$Page.Name}
> {$PageList.NameSpaced} {$Page.NameSpaced}
> {$PageList.Group} {$Page.Group}
> {$PageList.GroupSpaced} {$Page.GroupSpaced}
> {$PageList.LastModified} {$Page.LastModified}
> {$PageList.LastModifiedBy} {$Page.LastModifiedBy}
>
>
> {$PageList.PreviousName} {$Prev.Name}
> {$PageList.PreviousNameSpaced} {$Prev.NameSpaced}
> {$PageList.PreviousGroup} {$Prev.Group}
> {$PageList.PreviousGroupSpaced} {$Prev.GroupSpaced}
> {$PageList.PreviousLastModified} {$Prev.LastModified}
> {$PageList.PreviousLastModifiedBy} {$Prev.LastModifiedBy}
>
>
> {$PageList.NextName} {$Next.Name}
> {$PageList.NextNameSpaced} {$Next.NameSpaced}
> {$PageList.NextGroup} {$Next.Group}
> {$PageList.NextGroupSpaced} {$Next.GroupSpaced}
> {$PageList.NextLastModified} {$Next.LastModified}
> {$PageList.NextLastModifiedBy} {$Next.LastModifiedBy}
>
>
> {$PageList.FirstGroupPage} {$Is.FirstGroupPage}
> {$PageList.LastGroupPage} {$Is.LastGroupPage}
> {$PageList.FirstPage} {$Is.FirstPage}
> {$PageList.LastPage} {$Is.LastPage}
>
>
> {$PageList.PageCount} {$Count.Pages}
> {$PageList.GroupPageCount} {$Count.GroupPages}
> {$PageList.GroupCount} {$Count.Groups}
>
> 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.
> After this I would add all the stats available within the
> page array. I might then suggest something like:
>
> {$Page.LastModified.Time}
> {$Page.LastModified.Host}
> {$Page.LastModified.Author}
> {$Page.LastModified.Agent}
>
> {$Page.Title}
> {$Page.TitleSpaced}
> {$Page.Revision}
> {$Page.Version}
> {$Page.Size}
> {$Page.Targets}
>
> with 'Prev' and 'Next' versions for all of these, of course.
great.
> Any other stuff I should include? What about
> authorization data? I know Patrick has created a summary
> page with authorization. data, but this could easily be done
> with this recipe if the data is available. I haven't looked
> into it yet so I don't know where I would get the
> authorization data. If anyone wants this and wants to point
> me in the right direction, I will look into adding it.
It would be nice, if this will although configurable.
> All feedback appreciated,
done ;-)
Greets,
Daniel Scheibler
--
Daniel Scheibler ========:} student at
eMail: scheibi at gmail.com BTU Cottbus/Germany
WWW: http://www.scheiby.de
More information about the pmwiki-users
mailing list