On 02/24/2010 12:36 AM, Jerome Velociter wrote:
Hello devs,
When we are using XWiki for public web sites, most of the time we want
to hide some elements in the UI for guest users (and sometimes for
authenticated users as well).
Currently, it's not elegant to do so : either we have to create a custom
skin, override a couple of templates (with all the merging nightmare it
bringd when upgrading the wiki) - either we create a SSX to "hide"
visually elements.
None of those solutions are really satisfactory. The first one is
painful, the second one is only a workaround and can be a pain too
(there is no way currently to use a SSX "under certain conditions")
Before we can handle all this nicely using Interface eXtensions, I
propose to make couple of light changes to some templates to make our
life easier :
1) Add 4 variables in layoutvars.vm :
* $displayContentMenu // display or not the content menu (view, edit
links, etc.) true by default
* $displayMainMenu // display or not the main menu (wiki and space
links, user profile) true by default
* $displayDocExtra // display or not the tabs with doc extra links
(comments, attachments, etc.) true by default
* $displayShortcuts // display or not the document shortcuts (those are
in the line written under the document title)
(this is XWIKI-4394 "Allow some UI elements not to be displayed by
setting a variable")
2) Add a "extravars.vm" template that remains empty by default. This
will allow to override values from xwikivars/layoutvars without the need
to override them (and introducing the merging pain upon upgrade).
(this is XWIKI-4927 "We need a way to be able to override variables from
xwikivars.vm / layoutvars.vm without overriding these templates")
Please let me know what you think, I would like to move forward with
this during 2.3
+1 for all.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/