Hi Magick2, On 30 Jan 2015 at 01:54:42, magick2 ([email protected](mailto:[email protected])) wrote:
> Hi > > I am looking to use XWiki to store content which will be displayed in a 3rd > application, and will request the content in xhtml format using the > http://localhost/xwiki/bin/view/Main/testpage?xpage=plain&outputSyntax=xhtml > style page url. > > This returns excellent, clean html. However the images have relative urls. > > Can someone tell me how I make the generated xhtml always have absolute > urls? That’s a good question actually! We have an absolute URL resolver but we don’t have a way to specify it in the URL (it’s used only when we’re exporting content in XAR, HTML, PDF, etc) ATM… We should also offer a REST API to get the rendered content with absolute URLs as described in http://jira.xwiki.org/browse/XWIKI-9123 BTW you should use the “get” action as in: http://playground.xwiki.org/xwiki/bin/get/Sandbox/WebHome?outputSyntax=xhtml Note that you can also get the XML with: http://playground.xwiki.org/xwiki/bin/get/Sandbox/WebHome?outputSyntax=xhtml&xpage=xml FYI I’ve attached a quick patch on http://jira.xwiki.org/browse/XWIKI-9123 to generate absolute URLs: http://jira.xwiki.org/secure/attachment/30236/absolute-urls.diff However this is possibly not the best approach. The best approach IMO is to improve our REST API to get rendered content. Hope it helps a bit, Thanks -Vincent > Thanks _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
