[pmwiki-users] (:include parameters

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 23 16:59:17 CST 2005


On Mon, Nov 21, 2005 at 05:24:19PM -0500, Martin Fick wrote:
> OK, well I was attacking of few things at once here, let me
> see if I can slow things down (and maybe improve my
> suggestions a little) :)
> 
> I see the following issues:
>   1) (:include Page#Section1#Section2:)  always includes full lines
>   2) (:include Page#Section#SectionEnd:)  can be a little wordy
>   3)  includes with non-existing sections include the entire page.
> 
> a) One way would be to add a linemode=off parameter which would
>    allow Henrik's example:
> 
>       Hello There. [[#Start]]This is the first sentence that I want to
>       Include.[[#End]] And the rest I don't want.
> 
>    to work properly.

     I'm thinking something like (:include Page cut=#Start..#End:) .

> b) To make #2 prettier I suggest adding a new block=<blockname>
>    option (I orginally said section=, but block= is yet even
>    more concise) which would work similarly to the current
>      (:include Page#Description#DescriptionEnd:)
>    markup, but instead could be written as:
>      (:include block=Description Page:)

Unfortunately "block" is one of those words that tends to be overloaded
by too many meanings in markup languages.  So, at the moment I still
favor "section":

    (:include Page section=Description:)

Another possibility is to just have a shorthand syntax for
#Description#DescriptionEnd (replace the '+' below with some
other suitable character):

    (:include Page#Description+ :)

Pm




More information about the pmwiki-users mailing list