I need some of the pages to always show the left navigation in the documentation theme.
I am thinking of something somewhat opposite to that hiding it. So far, once you hid it on one space, it seems to remember that - so when users navigate from there - the left navigation is still hidden.
We want the left navigation to always remain. Is there a way to completely show this on the page.
Thanks,
I asnwered a similar question here and it could be adapted to fit your needs.
You could put this into an HTML macro in the page.
<script type="text/javascript"> AJS.toInit(function () { var splitPos = AJS.$('#splitter .vsplitbar').css('left') if(splitPos === '0px') { AJS.$('#splitter-button').click(); } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Can you please explain further how this code helps?
<script type="text/javascript"> AJS.toInit(function () { var show = getParameterByName('show_sidebar'); var splitPos = AJS.$('#splitter .vsplitbar').css('left') if((show === '1' && splitPos === '0px') || (show === '0' && splitPos != '0px')) { AJS.$('#splitter-button').click(); } }); function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script>
I already added it but it doesnt seem to work. When i navigate from a hidden left navigation page to another space - the left navigation is still hidden,
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.
Check out my code above. I adapted it from the link I sent in the answer. In the original link I sent the user was looking to control the nav based on a parameter passed in the url. The code above is adapted from that. If you put it into a page then it will always be open when you go to that page. You could even adapt this further to be a user macro (less easy to mess up and easier to add on multiple pages). He is an example. This would allow you to just put a macro called opennav on any page you want the nav open on.
Macro Name:
opennav
Macro Ttle:
Open Nav
Description:
Open the nav on page access.
Macro Body Processing:
No macro body
Template:
## Macro title: Open Nav
## Macro has a body: N
## Developed by: Davin Studer
## Date created: 09/26/2013
## Open the nav on page access.
## @noparams
<ac:macro ac:name="html">
<ac:plain-text-body><![CDATA[<script type="text/javascript">
AJS.toInit(function () {
var splitPos = AJS.$('#splitter .vsplitbar').css('left')
if(splitPos === '0px') {
AJS.$('#splitter-button').click();
}
});
</script>]]></ac:plain-text-body>
</ac:macro>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's simple as it is:
Macro Name: collapsesidebar Macro Title: Collapse Sidebar Description: Collapse sidebar by default (everywhere!) Macro Body Processing: No macro body Template: ## Macro title: Collapse Sidebar ## Macro has a body: N ## Body processing: Selected body processing option ## Output: Selected output option ## ## Developed by: Barbara Boros ## Date created: 08/28/2014 ## Installed by: Barbara Boros ## @noparams <style> #main { margin-left: 55px !important; } </style>
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.