Details
-
New Feature
-
Resolution: Fixed
-
Major
-
4.2-milestone-2
-
None
Description
I've been trying to figure out a mechanism for allowing XWiki Applications to alter the content of existing interface elements, like adding a new tab in the admin mode, or a new page in the global preferences, or new menu items, and I think that the best solution is to use an Overlay class. Here's how it would work (inspired by the awesome XUL model):
- an overlay object registers a piece of content that should be added inside a container, identified by an id.
- the added content can be inserter either at the start or at the end of the container, with an optional neighbor component (e.g.: inside #globalmenu, at the end, if possible before #watchmenuentry). If possible means that if that component exists, respect the required ordering, but if doesn't exist, don't fail.
- we provide two functions, onStartId and onEndId, which automatically detect what are the components that must be also added
- each application provides such overlay objects in a document inside the .xar archive
This makes it easy to extend some content, without actually modifying it, but requires massive changes in the existing template to replace <div id=..."> elements with onStartId() calls.
Attachments
Issue Links
- blocks
-
XWIKI-683 Rethink the way pages/blogs/spaces/etc are created
- Closed
- causes
-
XWIKI-21335 Privilege escalation (PR) from account through UIExtension parameters
- Closed
- relates to
-
XWIKI-9092 Allow installed applications to insert their page type in the creation step
- Closed