[pmwiki-users] Include from page with includes

Johan Bengtsson elijah at chalmers.se
Thu Aug 11 05:20:49 CDT 2016


On 08/10/2016 09:37 PM, Petko Yotov wrote:
> 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:).

Well it's not really possible to do that, it's in a pagelist template.

(:include Troublepage lines=3:) | head -n 3

would be nice but maybe not possible:-)

I guess I have to find some other solution to my problem.

Best regards,
Johan Bengtsson



More information about the pmwiki-users mailing list