On extensions.xwiki.org I’m pretty sure that the menu is built with https://extensions.xwiki.org/xwiki/bin/view/Extension/Menu%20Application. What you discovered is some extension created by somebody in the community and the latest update was done in 2016 and there could be incompatibility surprises when using on the latest XWiki versions. Regarding the style, it was customized to look nice with the installed color theme and you can do the same.
Although as @acotiuga said the top menu in Extensions is built with Menu Application, I would like to fully understand how Top Panel Menu works. It is a pretty simple extension that allows creating nice top menus. I’m able now to create new tabs, groups and list items, but I’m not able to control the visibility scope. @rogerpenna, @acotiuga, @ClemensRobbenhaar, which objects must I instantiate in which pages to get Top Pane Menu loading for all users, included anonymous ones?
Similar to the “Menu” Application shipped with XWiki, the “Top Panel Menu” does not check view rights of the links it produces.
The technical reason behind it is that it uses normal content in XWiki pages to create the menu and normal XWiki pages do not hide links to pages even if the current user has no access to them.
I am not sure how to solve this on the application side. If you are not afraid of lots of copy & paste you can check every list item and only display it if the current user has view rights; i.e. go through every ListItem-XX page, edit it in the wiki editor, and replace every line like:
Afterwards the menu should show only links to pages that are visible to the current user.
In case all entries in a section are not visible, it will still show the empty section, though. One probably would need to restrict the visibility of the corresponding page to exactly the viewers of any of these links.
Got it. But what I’m pursuing now is to control the visibility of the whole menu itself. I can control “Menu” Application scope by using the “Menu visibility scope” property available at the concerned tab under “Administer Wiki”. But this is not possible for “Top Panel Menu” to the best of my current understanding. At least in the XWiki instance I’m using now (XWiki Debian 16.5.0) “Top Panel Menu” is available only for logged users, not for anonymous ones. You won’t see the top menu if you go now to https://portal.igfae.usc.es. I can see it when loggged:
I don’t know how to control its visibility: I would like to show this simple top menu to all users, anonymous included. Could you help me with this?
Nice. As I’m looking for a very simple top menu, it won’t be hard to change the links so far. It will be also a nice exercise to design a simple counter to hide empty tabs! I will work on that!
Ah, that issue … the visibility of the whole men is currently hard wired.
If you go to the (hidden) page CustomExtension.TopPanelMenu.AfterHeaderUIX
(i.e. .../view/CustomExtension/TopPanelMenu/AfterHeaderUIX) and edit it in the “Object editor”, you can open the “UIExtensionClass 0: org.xwiki.contrib.application-toppanel-menu” object and look at the field “Code”.
In line 2 there is a check for anonymous users:
#if ($xcontext.user != 'XWiki.XWikiGuest' && $doc.fullName != "CustomExtension.TopPanelMenu.Content.WebHome") ## displayed only when a user is log on
and the menu should be shown to anonymous users, too. (I have not really checked if this works. It is possible some relevant CSS resources in “CustomExtensions” need to be made visible for anonymous users, too)
Although off-topic, allow me to reply! After all, we show a XWiki installation! @rogerpenna, no! We have only a small laser accelerator in Santiago de Compostela. Several other installations in Spain. We build parts for big experiments/infrastructures around the world!