I am considering implementing a custom XWikiRenderer that uses FreeMarker
(
http://www.freemarker.org/) to render the xwiki templates
(src\main\web\templates) and documents, as an alternative to velocity.
I thought that it would be as simple as implementing a custom XWikiRenderer,
however I discovered that
* the XWikiVelocityRenderer exposes some static methods, which is used
within a few different xwiki classes
* VelocityContext instances are constructed and manipulated outside from the
XWikiVelocityRenderer
Are there any plans to refactor the code base to support custom
XWikiRenderer implementations.
My ideal goal would be to enable a mix of rendering engines - freemarker,
velocity, or any other template language. However some metadata would be
needed to inform the rendering api which template engine to use.
To begin with - I'd like to be able to reuse all of the existing templates,
but specify for a wiki, or for a space, that freemarker is the default
rendering engine. Then an enhancement could be to allow each document to
override this.
Then - the next step could be to allow the templates to be written in
freemarker.
I am fairly experienced with freemarker having used it on a few web sites
over the last few years. I also implemented the integration code for
freemarker in webwork.
Thanks,
Cameron.