[pmwiki-users] summarize function (pagelisting with includes)
Patrick R. Michaud
pmichaud at pobox.com
Fri Mar 4 15:36:43 CST 2005
On Fri, Mar 04, 2005 at 03:56:25PM -0500, Martin Fick wrote:
> > (:pagelist group=Machine fmt=publish:)
>
> Coll, but why not use
>
> (:pagelist group=Machine fmt=include:)
Because "publish" is different from "include". With "publish",
we probably want each included item to have its page title
in front of it, and for printing skins we may want a page break
before each item.
For "include", we want just the text itself with no
fancy formatting, which I think is closer to what you wanted
(and better matches the (:include:) directive).
> (:pagelist group=Machine include)
> instead? it might be more intuitive.
Alas, this already has a meaning -- namely, all of the pages
in group Machine that contain the word "include". It's basically
the same as
(:searchresults group=Machine include:)
> > So, it's not hard to imagine doing
> > (:pagelist group=Machine fmt=include section=#Net:)
>
> which might then lead to:
>
> (:pagelist group=Machine fmt=include[#Net[#NetEnd]]:)
> or
> (:pagelist group=Machine include[=[#Net[#NetEnd]]:)
> (:pagelist group=Machine include[=nbegin..nend]]:)
With fmt=include#Net#NetEnd I can no longer switch output
functions simply based on the value of $args['fmt'] -- I
have to look for a prefix.
Using include=#Net#NetEnd I now have two different options
that specify how the list of things is to be output.
I'd prefer there to be just one.
Besides, there's already precedence in the (:include:)
directive in that it does:
(:include SomePage lines=20:) # first 20 lines of SomePage
I'm also planning to add
(:include SomePage paras=3:) # first 3 paragraphs of SomePage
Thus it becomes natural to do:
first five lines of each page in group Machine
(:pagelist group=Machine fmt=publish lines=5:)
first paragraph of each page in group Machine
(:pagelist group=Machine fmt=publish paras=1:)
and it's much cleaner to keep lines=, paras=, and section= as separate
arguments rather than try to specify them within include= or
publish= .
Pm
More information about the pmwiki-users
mailing list