Hello Eduard and Thomas,
Thanks for pointing me in the right direction, I got my little example
macro working.
Kind Regards,
Thomas
On 20 April 2016 at 15:54, Eduard Moraru <enygma2002(a)gmail.com> wrote:
Hi,
You could look at a very simple "userAvatar" macro for inspiration:
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwi…
Normally, you should:
- extend org.xwiki.rendering.macro.AbstractMacro,
- mark your implementation as an XWiki component (@Component) and give it a
name (@Named("colour")),
- register your component in your module's
main/resources/META-INF/components.txt,
- build and install your jar in your app's classpath,
- execute your macro (
http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExecuteMacros
).
Hope this helps,
Eduard
On Wed, Apr 20, 2016 at 10:51 AM, Thomas Wendel <drownedincoffee(a)gmx.net>
wrote:
Hi,
I am evaluating the XWiki Rendering Framework for a project of ours.
It was no problem to create a little POC to render some sample XWiki
syntax
into HTML. Next I tried to write a little colour
macro that simply
renders
some text in a colour which is specified as a
macro parameter. However, I
did not manage to get the macro executed. In the resulting HTML output I
get the error message:
Unknown macro: colour.The "colour" macro is not in the list of registered
macros. Verify the spelling or contact your administrator.
Now I have the following questions:
Is it possible at all to render a macro and execute it standalone with
the
rendering framework (as opposed to running it in
the XWiki Platform)?
As mentioned above, I implemented a little POC application that simply
renders XWiki syntax. The macro itself I implemented as a standalone
jar. I
put the macro jar in the class path and the
macro's package to the
context.txt of the POC application. Is that correct so far?
Am I missing something totally altogether?
Thanks for your help in advance.
Regards,
Thomas
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users