Hello,
I’m currently learning how to customize XWiki to adapt it to my company’s needs, and I’d like to make sure that I’m following the recommended best practices, especially so that my modifications remain easy to maintain and compatible with future upgrades.
I’ve already tried searching on the forum and in the documentation, but some aspects are still not very clear to me.
Here is what I think I understood, along with the questions I still have.
1. UI modifications (skins, .vm, themes)
I understood that when we want to modify existing elements of the XWiki interface (for example removing a button, adding a button in the header, etc.), we should modify or override the corresponding .vm files of the skin.
And for changing colors or some styles, this should be done in the theme configuration.
Is this the correct approach?
Also, is there a list or documentation of the .vm files and their roles in the XWiki interface, so it’s easier to know which ones should be modified depending on the need?
2. Creating custom components (HTML / JS / CSS)
If I want to create custom components using HTML, JavaScript and CSS, what would be the best approach in XWiki?
For example, is it better to:
-
create scripts directly inside a page
-
create a custom macro
-
or create a full extension?
3. CSS management
If I create a component (for example using a macro or a script) and define specific CSS classes:
-
is it better to include the CSS directly inside the macro/script
-
or add it to the global site theme?
For example, I would like to create something like cards (div elements containing an image, a title and an icon) that act as buttons to navigate between different wiki pages.
What would be the recommended way to implement this type of component in XWiki?
4. Modifying existing interface elements
If I want to modify some existing UI elements, for example:
-
change the style or display of the left panel
-
modify some navigation elements
What would be the recommended approach?
5. XWiki applications
I’ve also seen that it is possible to create applications in XWiki.
In which cases is it better to create an application rather than a simple script or macro?
And if I create an application, can I easily reuse its components in different pages of the wiki?
Sorry for the number of questions, but I would really like to understand the recommended best practices in the XWiki ecosystem in order to build something clean and easy to maintain in the long term.
Thank you very much for your help!