Enabling the HTML Macro
The HTML macro is disabled by default. You’ll need Confluence Administrator or System Administrator permissions to enable this macro.
Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. You should only turn on these macros if you trust all your users not to attempt to exploit them. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.
To enable the HTML macro:
- Go to > Add-ons.
- Select System from the drop down and search for the Confluence HTML Macros add-on.
- Expand the add-on and enable the html (html-xhtml) module.
Using the HTML Macro
To add the HTML macro to a page:
- In the Confluence editor, choose Insert > Other Macros
- Find and select the required macro
For sites using the default theme:
<script> AJS.toInit( function (){ if (AJS.$( "div.ia-fixed-sidebar" ).width() > 55){ AJS.Confluence.Sidebar.toggle(); } }); </script> |
For sites using the documentation theme:
<script> AJS.toInit( function (){ AJS.$( '#splitter-button' ).not( '.collapsed' ).click(); }); </script> |
More info: https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence
This seems to only work if I go into the space at the parent level. If the user had the side bar opened the last time they were logged in, and then later enters the space through a child page direct link, Confluence seems to keep the side bar open. Is there a way to enforce this through the whole project space, or can it only be enforced if the user enters through the project HOME page within the space?
LikeLiked by 1 person
Have you see my other post? https://jirasupport.wordpress.com/2015/06/09/how-do-i-remove-the-side-bar-and-the-button-in-confluence-5/
LikeLike