Hi*
We want our HOME pages to view the compact sidebar per default. At the moment we first have to click on pages to view this. This is one click to much ;-)
Some ideas to do that?
Best,
Björn
Hi Bjorn, one other thing to be aware of is that the sidebar width preference is stored in a cookie.
Thank you very much! One problem left ...
We have to choose the default theme, because we are using the design plugin CUTE. Is it possible to script that macro to click first on "pages" so that we can use the default theme and have the compact sidebar?!
That would be great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by click on "pages"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When using the default theme the homepages of the spaces are without sidebar. So if we want to see them, we have to click on the link pages above the space title to have a sidebar. would be fine, if we could use the default theme WITH a compact sidebar per default on the space home's.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I think I get what you are saying. Are you wanting to have the fly-out navigation visible by default on the home page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Davin. No, we have a special designed Space for our company homepage, so i have to use the macro on the spaces wich should show the compact sidebar on their home's.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Davin
I am sorry, but that is not what we need. We just want to have the default compact (small) sidebar on a few pages without clicking on "pages" first. That would be great. The Navigation out of the macro you build hides our company logo.
Thanks a lot for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. I removed the second answer. The first user macro should get you what you want. It should compact the sidebar by default on any page that the macro is included on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could put this into an html macro on your home page. It will check if the sidebar is collapsed. If not it will programatically click the collapse handle for you.
<script type="text/javascript"> AJS.toInit(function () { if(AJS.$('.ia-fixed-sidebar.collapsed').length == 0) { AJS.$('.ia-fixed-sidebar .space-tools-section .expand-collapse-trigger').click(); } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could even take it a step futher and create a user macro that you could put on any page that you want to have the nav collapsed by default.
Macro Name:
collapsenav
Macro Ttle:
Collapse Nav
Description:
Collapse the nav on page access.
Macro Body Processing:
No macro body
Template:
## Macro title: Collapse Nav
## Macro has a body: N
## Developed by: Davin Studer
## Date created: 09/26/2013
## Collapse the nav on page access.
## @noparams
<ac:macro ac:name="html">
<ac:plain-text-body><![CDATA[<script type="text/javascript">
AJS.toInit(function () {
if(AJS.$('.ia-fixed-sidebar.collapsed').length == 0) {
AJS.$('.ia-fixed-sidebar .space-tools-section .expand-collapse-trigger').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.
Ok, I think this should meet your needs to have the fly-out navigation appear by default.
Macro Name:
collapsenav
Macro Ttle:
Collapse Nav
Description:
Collapse the sidebar and show fly-out nav on page access.
Macro Body Processing:
No macro body
Template:
## Macro title: Collapse Nav ## Macro has a body: N ## Developed by: Davin Studer ## Date created: 09/26/2013 ## Collapse the sidebar and show fly-out nav on page access. ## @noparams <ac:macro ac:name="html"> <ac:plain-text-body><![CDATA[<script type="text/javascript"> AJS.toInit(function () { if(AJS.$('.ia-fixed-sidebar.collapsed').length == 0) { AJS.$('.ia-fixed-sidebar .space-tools-section .expand-collapse-trigger').click(); } AJS.$('.ia-secondary-header .parent.ia-secondary-header-title.wiki .parent-item .parent-item-link[title=Pages]').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.
Davin,
When setting this up in Confluence 5.3.1, it works, but once collapsed it seems like all Global Theme spaces and other pages in the same space are now collapsed as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, it programatically clicks the collapse button which saves the state. If you want to only collapse it on certain pages, you would have to set the css styles manually so that it is not carried to other pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.