Usually for this use case the included page should be wiki content:

  Hello world

And then you include it using {{include}} macro as in:

{{include reference="API.InterfaceDocTemplate"/}}


On Mon, Sep 15, 2014 at 9:08 AM, 李例 <> wrote:
>         Hello, now I have this scenario: I’d like to use a page(which 
> includes some velocity macros) in another new page, I use the snippet below 
> in my new page:
> {{velocity}}
> #set($reference = $services.model.createDocumentReference('', 'API', 
> 'InterfaceDocTemplate'))
> #set($document  = $xwiki.getDocument($reference))
> $xwiki.getDocument($document).getContent()
> {{/velocity}}
> but it turns out that the velocity macros cannot be executed, and the alert 
> is “Failed to execute the [velocity] macro”.
>         I would greatly appreciate if someone could give me a solution.
>         Excuse my poor English please, thank you very much!
> _______________________________________________
> users mailing list

Thomas Mortagne
users mailing list

Reply via email to