We have a need to change the way we open network folders and files.
Right now, a link with an UNC-path is handled as file:[UNC_PATH], but we need to change that through the whole XWiki to localfile:[UNC_PATH]
Is this something that can be changed? If so, where do I need to make a change?
Am I right that I need to make a change in the “UNCXHTMLLinkTypeRenderer”?
vmassol
3
We don’t provide this kind of refactoring ATM, would be interesting to do at some point.
However you have several solutions:
vmassol
4
ok I think I misunderstood you You want to change the rendering of UNC links.
vmassol
5
Yes that’s correct. You can provide a new implementation of that component with a higher priority so that your version is used. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Component%20Module#HOverrides
1 Like
Thanks, I will try to get this working!
Am I right that the “Component Module” is already installed as a “core extension” as the “XWiki Platform - Component - Script Service”?
vmassol
8
Yes it’s already installed as it’s core (but it’s not the one you listed but it doesn’t matter).
See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingComponents/
We are looking into this, but we are having trouble locating the META-INF/components.txt file.
Do we need to create this file ourselves or is it located somewhere already?
P.s. We are running XWiki in a docker, so that’s another layer of complexity.
EDIT: Seems like we’ll need to use Maven (Creating a XWiki component using Maven)
vmassol
10
It seems we misunderstood each other. When I said:
This means coding a new component ie in development mode.
OTOH, you could also use a wiki component to achieve the same result, see https://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent%20Module (but using java is a better choice).