Include External Content

Last modified by Manuel Leduc on 2026/06/02 17:54

cogShows to include external content in your wiki page
TypeSnippet
Category
Developed by

Vincent Massol

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

There are various solutions depending on the external system you're connecting to.

  • Solution 1: Use the getURLContent API. For example (you can also check the External Pretty Code example):
    {{velocity}}
    $xwiki.getURLContent('http://localhost:8080/xwiki/bin/get/Sandbox/WebHome?outputSyntax=xwiki&outputVersion=2.1')
    {{/velocity}}
  • Solution 2: Use your external system's REST API. XWiki offers a REST API.
Information

Of course, if you just want to include content from one XWiki subwiki into another subwiki, all you need to do is use the Include Macro with a full reference specifying the wiki part. For example:

{{include reference="wiki:space.page"/}}

Get Connected