This hides the Page Title
Name | hide-sidebar |
---|---|
Macro Body Processing | No Macro Body |
Usage | {hide-sidebar} |
Reference | https://answers.atlassian.com/questions/3308/how-can-i-hide-the-left-sidebar-on-some-pages-when-using-the-documentation-theme |
Closely related to User Macro: hide-comments and User Macro: hide-metadata
Code
## @noparams <script> // Find out the initial state of the sidebar and set a cookie jQuery.cookie("showsidebar",AJS.$("div#splitter-sidebar").width(), {expires:5}); //If the sidebar is visible, hide it and the split bar... if (AJS.$("div#splitter-sidebar").width() > 0) { AJS.$(".vsplitbar").hide(); AJS.$("div#splitter-sidebar").width(0); // ...then change the width and position of the content AJS.$('#splitter-content').css({'width':'100%', 'left':'0'}); }; // The unload function runs when the user navigates away from the page jQuery(window).unload(function() { // Read the cookie to find out where the sidebar was originally var origstate = jQuery.cookie("showsidebar"); // If the sidebar is now hidden and it wasn't originally, // Click the button if (AJS.$("div#splitter-sidebar").width() != 300 && origstate == 300) { AJS.$("#splitter-button").click(); }; // Then delete the local cookie jQuery.cookie("showsidebar", null); }); </script>