Hello Vincent,
I was using the xwiki-rendering-archetype-macro because it will already
contain all the dependencies required for the rendering purpose. Yes, I am
not creating a macro so I plan to delete the extra files(which are
generated using archetype) which will not be required for this. For this, I
think I will also have to modify the pom.
I am following this guide
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
I am already following the pattern similar to WikiWord Transformation.
So, according to you, I should simply create a maven project, without using
the archetype with a jar packaging, and then follow the pattern of WikiWord
Transformation.
Also, I am not able to think of how will I use this component in taking
glossary items from the glossary space. For the component to be accessible
on wiki pages, I would have to write a ScriptService. But, I am not getting
the idea, how would I use that script for glossary items already present in
glossary space?( This may be confusing for you!!)
Some hints required.........
Rest of the things like scanning the wiki pages and creating links to the
glossary items will not be that difficult I suppose.
I am little new to this, please guide me a little.
Thanks 🙂
Sarthak Gupta
On Sat, Jun 17, 2017 at 4:45 PM, Vincent Massol <vincent(a)massol.net> wrote:
Hi,
On 17 Jun 2017, at 12:59, Sarthak Gupta
<sarthakgupta072(a)gmail.com>
wrote:
Hello,
The next part of my project is creating transformations i.e displaying
words included in glossary differently when a page renders. After going
through docs, I understood that I have to write a new rendering
transformation. This new transformation will match the words on different
pages to the glossary items present in the glossary space, and then
create
links to the required glossary page.
What should be the name of this transformation? glossaryTransformation?
GlossaryTransformation sounds good indeed.
Furthermore, I have used the
xwiki-rendering-archetype-macro for
generating
the component using maven
[
mvn archetype:generate \
-DarchetypeArtifactId=xwiki-rendering-archetype-macro \
-DarchetypeGroupId=org.xwiki.rendering \
-DarchetypeVersion=9.5-SNAPSHOT
]
You don’t really need this but it’s ok if you use it too. Note that you’re
not developing a macro though.
In practice you just need to read
http://contrib.xwiki.org/
xwiki/bin/view/Main/WebHome#HImplementingyourMavenbuild and also check
the WikiWord transformation maven module which is at
https://github.com/xwiki/xwiki-rendering/tree/master/xwiki-rendering-
transformations/xwiki-rendering-transformation-wikiword
Thanks
-Vincent
I am still working on the component
implementation.
Hope I am going on the right track.
Thanks :)
Sarthak Gupta