Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread Bryn Jeffries
> > Vincent wrote: > > > {{velocity}} > > > #if("$!{request.xpage}" != 'plain') > > > $response.sendRedirect() #else > > > Hello world! > > > #end > > > {{/velocity}} > > > > > > > Thanks again for the quick response. That's a good suggestion, but I think > loses any query parameters that I'd

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread vinc...@massol.net
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.

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread Thomas Mortagne
On Wed, Sep 23, 2015 at 9:27 AM, Bryn Jeffries wrote: > I 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 >>>

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread Bryn Jeffries
I 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

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread vinc...@massol.net
On 23 Sep 2015 at 09:27:36, Bryn Jeffries (bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote: > I 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

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread Bryn Jeffries
Vincent wrote: > {{velocity}} > #if("$!{request.xpage}" != 'plain') >   $response.sendRedirect($doc.getURL('view', 'xpage=plain')) #else >   Hello world! > #end > {{/velocity}} > Thanks again for the quick response. That's a good suggestion, but I think loses any query parameters that I'd

Re: [xwiki-users] Set plain output from within script

2015-09-23 Thread vinc...@massol.net
  On 23 Sep 2015 at 09:55:29, Bryn Jeffries (bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote: > Vincent wrote: > > {{velocity}} > > #if("$!{request.xpage}" != 'plain') > > $response.sendRedirect($doc.getURL('view', 'xpage=plain')) #else > > Hello world! > > #end > >

[xwiki-users] Set plain output from within script

2015-09-22 Thread Bryn Jeffries
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