[pmwiki-users] Include from page with includes

Petko Yotov 5ko at 5ko.fr
Wed Aug 10 14:37:14 CDT 2016


On 2016-08-10 14:26, Johan Bengtsson wrote:
> (:include Pagename lines=3:) # works fine
> 
> Now I try to include from "Troublepage" which is built by an include
> from a third page:
> (:include Troublepage lines=3:)
> 
> Instead of getting three lines I get everything that is included into
> Troublepage. Is there any way to avoid this?

The code you use will include the first 3 lines of wikitext from the 
remote page, as if they were written in the current page (only fixing 
page links and variables). Then this wikitext will be processed into 
HTML. So if Troublepage contains simply (:include Thirdpage:) then this 
first line will be included in the current page and then processed as if 
it were written here.

If you want to include the first 3 lines from Thirdpage, use directly 
(:include Thirdpage lines=3:).

If you have a dynamic pagelist and want to show only the first 3 
results, use (:pagelist [other parameters] count=3:).

Petko

---
Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades





More information about the pmwiki-users mailing list