[pmwiki-users] Great pagelist question...

The Editor editor at fast.st
Wed Aug 30 09:42:34 CDT 2006

Great Patrick!  I like the syntax fine.

This would really extend the flexibility of the FAST Data recipe (and
perhaps other recipes). I've already run into a couple cases as I've
tried implementing it in various applications where being able to
retrieve such variables would be fantastically useful.

To do this, we, er, you : ) would have to:

1) modify how the page variables are set in my recipe, so they can be
parameterized (as lines added to page file format, or otherwise added
to the page array?).

(I can do the part making the parameterizing optional, ie (:data
^Group.Name:) calls a line or two you provide setting the page
variables with parameterized cotent. I need to rework it anyway to
allow some other options).

2) modify core so the special $: marker would be available in pagelists.

Any idea how long it might take to have something like this available?
I don't mind being a guinnea pig if you want someone to test this out
rigorously before implementing it in core.  :)

On the other hand....

On 8/30/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
Yes, this is exactly what the Cookbook does, so that
>    {Cookbook.XYZ$RecipeSummary}
> retrieves the "RecipeSummary:" line from the Cookbook.XYZ page,
> as opposed to {$Summary} which retrieves the "Summary:"
> line from the current page.  They're all held in arrays based
> on the page's full name.

(I rewrote this to say what I think you meant)

> I'll need to look at your code a bit more.  PmWiki's approach
> up-to-now has been to store special values as separate page
> attributes, to potentially make it easier to do searches/sorts
> and avoid re-scanning the entire markup text of each page for each
> page variable.  But there's something to be said in favor of
> scanning it directly from the markup for a given pattern.

Thinking through your cookbook example and the above paragraph it
occurred to me I could probably set up a special case in the data SAVE
function which optionally allows a user to delineate extra fields in
the page file format, producing something like:

version=pmwiki-2.1.11 ordered=1 urlencoded=1
text=adasasfafsaf field1=value1 field2=value2 field3=value3

It might be a bit of trouble to work out the code, but probably not
too difficult.  I'm already doing this for titles, author, time, etc.
Would this by itself allow me to use something like the following with
the existing PmWiki code?

(:data {=$FullName} :)
* [[ {=$FullName} |{=$field1}]]


More information about the pmwiki-users mailing list