[pmwiki-users] Include from multiple pages
Petko Yotov
5ko at 5ko.fr
Tue Feb 3 05:35:55 CST 2009
On Tuesday 03 February 2009 10:31:40 Simon wrote:
> Thanks for correcting my understanding.
> How about an option for the include that selects the include behaviour,
> eg extract from first only, or extract from all.
(:include:) markup is widely used and a change of how it works may potentially
break an existing site. But if there is enough interest, I suspect this is
doable by adding another markup, such as:
(:include-all [include parameters]:)
> What I want to do is extract the first n lines from as many includes
> as it takes, eg
> (:include Page1#from1#to1 Page2#from2#to2 lines=12 :)
With the current PmWiki state, here is what I'd do.
If every page has different #fromX#toX sections, the only way is :
(:include Page1#from1#to1 lines=12:)
(:include Page2#from2#to2 lines=12:)
(:include Page3#from3#to3 lines=12:)
If the section names are the same in every page, or if I want to include 12
lines from the beginning, I can use a pagelist:
(:if false:)
[[#inc12]]
(:include {=$FullName} lines=12:)
[[#inc12end]]
* [[Page1]]
* [[Page2]]
* [[Page3]]
...
(:if:)
(:pagelist trail={$FullName} fmt=#inc12:)
Thanks,
Petko
More information about the pmwiki-users
mailing list