[pmwiki-users] (:sectionlist:) proposal (was: New template expression markup....)

Patrick R. Michaud pmichaud at pobox.com
Tue May 1 08:51:47 CDT 2007


On Tue, May 01, 2007 at 08:25:57AM -0500, Patrick R. Michaud wrote:
> On Tue, May 01, 2007 at 09:04:24AM -0400, The Editor wrote:
> > On 5/1/07, Hans <design5 at softflow.co.uk> wrote:
> > >Tuesday, May 1, 2007, 1:23:16 PM, Patrick R. Michaud wrote:
> > >> It might also be worthwhile to generalize PTVs to work with
> > >> sections.  For example:
> > 
> > Yes! Yes!  I want to second this.
> 
> It's just an idea at this point, I can't commit to an implementation
> at the moment.  
> 
> One of the big issues is that the next step will be a request to
> make it work with pagelists somehow.... and that's not likely
> to happen anytime soon.  So, all I'm doing above is suggesting
> a markup approach, without any particular promise to implement it
> until/unless there's a huge demand for it.

Continuing on the brainstorming track, we could develop a
(:sectionlist:) markup that does for sections the same thing
that (:pagelist:) does for pages.  In particular, (:sectionlist:)
would read a page's markup, split it into sections by anchor, and 
then apply a template to each section.  For example:

    (:sectionlist fmt=Site.BlogTemplate:)

    [[#id0001]]
    (:author:Pm:)
    (:date:2007-05-01:)
    (:subject:demonstration of sectionlist:)
    (:text:...:)

    [[#id0002]]
    (:author:Alice:)
    (:date:2007-05-01:)
    (:subject:what a cool idea:)
    (:text:...:)

Or, to view the sections from another page:

    (:sectionlist OtherPage fmt=Site.BlogTemplate:)

Of course, one could use (:sectionlist:) inside of a pagelist
template to apply templates to sections across multiple pages:

    [[#sectionlist]]
    (:sectionlist {=$FullName} fmt=Site.BlogTemplate:)
    [[#sectionlistend]]

Note that I make no representations as to how fast or slow this
is likely to be, nor am I committing to any implementation or timeline
for such.  At this stage I'm just suggesting a direction for discussion,
and indicating the direction I'm likely to head for this.

Pm



More information about the pmwiki-users mailing list