How can I create a terminal page in velocity

Hi there!
I am diddling around, creating something awesome on XWiki (at least that’s what I am convinced of) but now I ran into something I am not able to find any resource on; the creation of a terminal page in velocity.
I wonder if anyone could help me out with this. Is it even possible?
Thanks in advance,

Well, that is an awkward situation. It appears that if I put a single page in the getDocument call (like $xwiki.getDocument("myPage")) it was not making the page. If I called it with the webhome child page it worked (like $xwiki.getDocument("myPage.WebHome")).

When I called it with the spaces that are used in the eventual environment like ($xwiki.getDocument("mainSpace.subSpace.myPage")) where the velocity is being used in it worked like a charm.

I did not know that. Yet another thing learned :tada:

Thanks anyway :slight_smile:


Here’s an example:

The parameter is a reference. See

If you pass just “myPage”, it’s going to be resolved to the current wiki/space/etc.

You can try it with:

#set ($d = $xwiki.getDocument("myPage"))
1 Like