[xwiki-users] Fw : Include & Co board effect
NB: new include function {{include reference="BacASable.Page" type="document" /}} doesn't work well when target page contains a velocity macro If target page contains a macro velocity (#macro( foo $color ), the main page containing "include reference" can't call foo macro. (with includeInContext it's working) --- En date de : Jeu 10.9.15, Pascal BASTIEN <[email protected]> a écrit :
De: Pascal BASTIEN <[email protected]> Objet: [xwiki-users] Include & Co board effect À: "XWiki Users" <[email protected]> Date: Jeudi 10 septembre 2015, 10h33 Hello,
In my velocity script I try to include some velocity code from another page. I want similare function like "source" in bash, it's like copy/paste some code in main script from another file. I read https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity and use #includeInContext("mySpace.myPage") but there are board effect: #includeInContext return HTML code like this <p>I call MyMacro<br/><p>My color is Red</p>... Then to obtain what I want I must user html tag: {{html}} #includeInContext("mySpace.myPage") {{/html}}
Is it normal?
Thxs,
Pascal B _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Pascal, You should use {{include}} for transclusions and {{display}} for inserting the result of the execution of some page. Thanks -Vincent On 10 Sep 2015 at 11:26:25, Pascal BASTIEN ([email protected]) wrote: NB: new include function {{include reference="BacASable.Page" type="document" /}} doesn't work well when target page contains a velocity macro If target page contains a macro velocity (#macro( foo $color ), the main page containing "include reference" can't call foo macro. (with includeInContext it's working) --- En date de : Jeu 10.9.15, Pascal BASTIEN <[email protected]> a écrit :
De: Pascal BASTIEN <[email protected]> Objet: [xwiki-users] Include & Co board effect À: "XWiki Users" <[email protected]> Date: Jeudi 10 septembre 2015, 10h33 Hello,
In my velocity script I try to include some velocity code from another page. I want similare function like "source" in bash, it's like copy/paste some code in main script from another file. I read https://network.xwiki.com/xwiki/bin/view/DocXE31Fr/IncludeInVelocity and use #includeInContext("mySpace.myPage") but there are board effect: #includeInContext return HTML code like this <p>I call MyMacro<br/><p>My color is Red</p>... Then to obtain what I want I must user html tag: {{html}} #includeInContext("mySpace.myPage") {{/html}}
Is it normal?
Thxs,
Pascal B _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
Pascal BASTIEN -
vincent@massol.net