On Thu, Oct 8, 2015 at 5:33 PM, [email protected] <[email protected]>
wrote:

>
>
>
> On 8 Oct 2015 at 16:23:51, Eduard Moraru ([email protected](mailto:
> [email protected])) wrote:
>
> > Hi,
> >
> > You did not mention how you are doing the "conversion". Are you using the
> > rendering script service?
> >
> > Anyway, one thing I can think of is to set the context document before
> > starting the conversion process. Here is a snippet that would exemplify
> > this:
> >
> > {{velocity}}
> > $xcontext.doc
> > $xcontext.setDoc($xwiki.getDocument('Sandbox.WebHome').document)
> > $xcontext.doc
> > {{/velocity}}
> >
> > Note that it requires Programming Right (on the author user) to be able
> to
> > be executable.
>
> BTW Edy, we have a {{context}} macro for doing this :)
>
> See
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Context+Macro
>

Did not know about this one.

However, it seems limited to links and images, as the description says.
Also, it is not really meant to be used programatically (i.e. velocity), so
not very useful in the current usecase, since you can`t grab the result in
velocity.

Thanks,
Eduard


> Thanks
> -Vincent
>
> > Hope this helps,
> > Eduard
> >
> >
> > On Wed, Oct 7, 2015 at 12:38 PM, Peter Huisman wrote:
> >
> > > Hi,
> > >
> > > I am using a conversion from XWiki syntax to XHTML which is working
> like a
> > > charm. The challenge I have however is the following:
> > >
> > > I am running a (test velocity) script from the Sandbox space. I am
> > > converting documents in a different space (let’s say AAAA).These
> documents
> > > contain objects with textarea’s where the references are in the form of
> > > [[text>>doc:filename]] since it refers to documents in the AAAA space.
> The
> > > conversion of XWiki links is “going down the drain” since the
> converter is
> > > using the Sandbox space to resolve the reference to the page and
> generates
> > > a create reference to the file.
> > >
> > > Is there an easy way to set the (default) space (in either Java or
> > > Velocity) without having to run the script from the actual space (in
> this
> > > case, the AAAA space)?
> > >
> > > Br,
> > >
> > > Peter
> > > _______________________________________________
> > > users mailing list
> > > [email protected]
> > > http://lists.xwiki.org/mailman/listinfo/users
> > >
> > _______________________________________________
> > users mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to