Did you know that you can customize the skin of your wiki? For example, if you'd like to remove a button from a wiki page, this would involve modifying the skin, which organizes visually the wiki pages content. It's different from Color Themes (and here's an article on how to update the color theme on your wiki) which are set of colors for the various elements of a skin.
In this article, we will get into detail on how to hide the More Actions menu1 (available at the click on this button ), in order to help you reach a better understanding of skin customizations. We will work on the XWiki 12.3 version, which has the Flamingo Skin bundled by default.
Let's go through the steps of one method to remove the "More Actions" menu:
Customize your wiki skin
In the steps below you will learn how to make use of the bundled Skin application to customize your wiki skin. As a user with Administration rights, follow the instructions below on your wiki:
Steps for adding an overridden template object
- Go to the Administration, in the "Look & Feel" section
- Enter the name of the skin to edit (by default: XWiki.DefaultSkin).
- Click on "Customize". You will get the skin editing page.
- Go to the "Overridden templates" section
- Enter the name of the template that you want to override: in this case layoutExtraVars.vm. By overriding this .vm file you can safely override layout variables that are in layoutvars.vm.
- Then write the new code in the dedicated content section. In this case, the code will add some restrictions regarding who will be able to see the "More Actions" menu:
#set($currentUserGroups = $services.user.group.getGroups($xcontext.user, 'xwiki', $true))
#set($userGroupReference = $services.model.createDocumentReference('xwiki', ['XWiki'], 'XWikiAdminGroup'))
#if (!($currentUserGroups.contains($userGroupReference) || $hasAdmin))
#set($displayMoreActionsMenu = false) ## more actions menu
#set($displayAdminMenu = false) ## the admin menu, related to the page
#end
Don't forget to Save and View the modifications.
Loading the video player...
I hope you enjoyed this short tutorial and that you now feel more at ease with adding customizations to your wiki.
What would you customize on your wiki skin?
1 The steps of how to hide the More Actions menu have originally been described on our community FAQ.