On 2/24/10 8:35 AM, Vincent Massol wrote:
On Feb 24, 2010, at 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
Is this notion not specific to colibri only? Do we want to make it a generic feature for all skins or do we want to add an empty skinlayoutvars.vm in templates/ that are there so that skins fill it with skin-specific vars?
I tend to think we don't want to introduce skin-specific variables. I would say we have all four variables in templates/ and displayContentMenu is ignored for older skins as they had no content menu (i.e. everything was in the "main menu"). My description of the main menu above was colibri specific indeed
* $displayDocExtra // display or not the tabs with doc extra links (comments, attachments, etc.) true by default
Don't we already have a variable for hiding the doc extra tabs? We need to make sure we use the same one.
I will check that, yes. Jerome.
* $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
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs