Hi Bryn, On 23 Sep 2015 at 07:48:15, Bryn Jeffries (bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:
> I have several scripts (Groovy and Velocity) that generate output that should > not be rendered as a Wiki page. This is necessary, for example, when > rendering JSON. As documented before > (http://extensions.xwiki.org/xwiki/bin/view/Extension/Output+JSON) , it's > possible to allow such content by including request parameters xpage=plain > and outputSyntax=plain. However, this approach requires all pages that refer > to the script to remember to include these parameters, which is rather error > prone. > > Is there a way for a script to explicitly disable rendering instead? Yes, there is :) For Groovy, seeĀ http://extensions.xwiki.org/xwiki/bin/view/Extension/Script+Macro (check the output and wiki parameters) For Velocity, seeĀ http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro (same parameter names). Thanks -Vincent _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users