[pmwiki-users] Include from multiple pages

Simon nzskiwi at gmail.com
Tue Feb 3 03:31:40 CST 2009


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.

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 :)

Simon


2009/2/3 Petko Yotov <5ko at 5ko.fr>:
> On Monday 02 February 2009 10:43:12 Simon wrote:
>> On http://pmwiki.org/wiki/PmWiki/IncludeOtherPages
>>
>> it states that
>>
>> (:include PageName GroupName.Pagename:)
>> Includes the entire text of another page into the current page.
>> Multiple pages may be specified
>>
>> I interpret this to mean that the text from all specified pages will
>> be copied into the current page.
>
> The phrase continues...
>  Multiple pages may be specified, but only the first available is included.
>
> This is an intended behavior, and this principle is used in SideBars and other
> site-wide pages that can be overridden by a Group's own pages.
>
>
>> Further down its states
>> (:include Page1#from1#to1 Page2#from2#to2:)
>> Include the first from the first available of Page1 (between the
>> [[#from1]] and [[#to1]]) or Page2 (between the [[#from2]] and [[#to2]]
>> )
>>
>>
>> This seems wrong to me, the syntax is the same, the outcome is different.
>> Is this a bug?
>
> It is the same outcome.
>
> * If Page1 exists, pmwiki does an (:include Page1#from1#to1:) and shows
> whatever is between the two anchors in Page1.
>
> * If Page1 does not exist, pmwiki does an (:include Page2#from2#to2:) and
> shows whatever is between those two anchors in Page2.
>
> It is probably less intuitive that if Page1 exists but there is nothing in
> between #from1#to1, nothing is displayed.
>
> If there is a way to improve the documentation and make things less confusing,
> please improve it.
>
> Thanks,
> Petko
>



-- 

http://kiwiwiki.co.nz



More information about the pmwiki-users mailing list