[pmwiki-users] Include from multiple pages

Petko Yotov 5ko at 5ko.fr
Mon Feb 2 23:37:42 CST 2009

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.


More information about the pmwiki-users mailing list