Hello
I created this user macro to completely hide sidebar (I don't want the sidebar to be seen in any way) in Confluence 6.6.1
## Macro Name: hide-sidebar
<script>
$(window).load(function() {
$('body#com-atlassian-confluence.theme-default.aui-layout.aui-theme-default div#page div#full-height-container div.ia-splitter div.ia-fixed-sidebar').hide();
$('body#com-atlassian-confluence.theme-default.aui-layout.aui-theme-default div#page div#full-height-container div.ia-splitter div#main.aui-page-panel').css('margin-left', '0');
});
</script>
This is applied to a single Space in "Look & Feel" -> "Sidebar, header & footer" area, using wiki markup.
How can I change this user macro in order to apply it only to a specific user? I mean something like this
if (user-info:username =="Charlie") then
Thank you in advance
Hi Stefano,
this should do it:
## @noparams
#set( $username = "$req.getRemoteUser()" )
#if($username.equals("Charlie"))
<script>
$(window).load(function() {
$('body#com-atlassian-confluence.theme-default.aui-layout.aui-theme-default div#page div#full-height-container div.ia-splitter div.ia-fixed-sidebar').hide();
$('body#com-atlassian-confluence.theme-default.aui-layout.aui-theme-default div#page div#full-height-container div.ia-splitter div#main.aui-page-panel').css('margin-left', '0');
});
</script>
#else
do-nothing
#end
It works perfectly!
I only deleted the " #else do-nothing" rows because text "do-nothing" can be written into the page.
Thank you very much Thomas! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome, @SDB Admin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.