[Pmwiki-users] including parts of a page, once again

Patrick R. Michaud pmichaud
Fri Jul 16 21:42:09 CDT 2004


On Sat, Jul 17, 2004 at 03:18:45PM +1200, John Rankin wrote:
> >> > [:include SomePage##a :]                  from beginning to #a
> >> > [:include SomePage#a# :]                  from #a to end of page
> >> I really think those are confusing... didn't we have them just a few
> >> lines above already?
> OTOH, I quite like them. And presumably this would also work:
>  [:include SomePage#..#a :]                  from beginning to #a
>  [:include SomePage#a..# :]                  from #a to end of page

I believe these also work, although there's a good argument to be
made that the above should be "from the previous anchor to #a" and
"from #a to the next anchor".  Essentially the '..' is optional
(syntactic sugar).

> My 5? worth:
> 
> - what are some real world scenarios where one would use all these 
>   capabilities; it feels like a lot of additional structure that may 
>   not get used very often

Well, the individual capabilities -- include sections, lines, or paragraph --
have been frequently requested and will get a fair amount of use.  Simple
combinations, such as "first paragraph of a section" is also somewhat
useful.  Some of the more arbitrary combinations, while not often used,
actually come for "free" in the implementation and it'd take extra work
to prevent them.

> - but, yesterday [...] I wanted to include the first few
>   paragraphs, skip a bunch, then include the rest of the page; in
>   other words: include page, but omit paragraphs between #a to #b
>     I guess I do [:include Page..#a :]
>                  [:include Page#b.. :]

Yup.  

>   I almost wanted conditional text -- the ability to show or hide
>   different bits of text under different conditions, but decided
>   this would be gratuitous

Conditional text is implemented in 2.0, although I'm not entirely 
certain how I'd be able to use the current 2.0 implementation to 
achieve the desired result just yet.  I'll have to think on it a
bit.

Pm



More information about the pmwiki-users mailing list