[xwiki-devs] Plugin generated menus
I would like to add a menu selection for a plugin similar to the Watch menu. However, I cannot figure out where this is done. I initially thought the WatchListPlugin would be a good example but I don't see any code there dealing with menus. How would a plugin go about adding to system menus? Thanks, Glenn
[email protected] wrote:
I would like to add a menu selection for a plugin similar to the Watch menu. However, I cannot figure out where this is done. I initially thought the WatchListPlugin would be a good example but I don't see any code there dealing with menus.
How would a plugin go about adding to system menus?
The menu is generated by velocity inside templates/menuview.vm, and it is not easily extensible (although we're planning to change this in the future). So, you have two options: - Change menuview.vm on your site - Dynamically add your menu entries using JavaScript, pulled in using the JSX plugin. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
[email protected] wrote:
I would like to add a menu selection for a plugin similar to the Watch menu. However, I cannot figure out where this is done. I initially thought the WatchListPlugin would be a good example but I don't see any code there dealing with menus.
How would a plugin go about adding to system menus?
The menu is generated by velocity inside templates/menuview.vm, and it is not easily extensible (although we're planning to change this in the future). So, you have two options:
- Change menuview.vm on your site - Dynamically add your menu entries using JavaScript, pulled in using the JSX plugin.
There is a snippet available for this second option, check http://code.xwiki.org/xwiki/bin/view/Snippets/DymanicNewTopMenuEntriesSnippe... Jerome.
participants (3)
-
glenn_engel@agilent.com -
Jerome Velociter -
Sergiu Dumitriu