Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Because we have already a main - navigation within our custom theme, we want to hide the navigation bar in the Confluence header. How do we configure this without losing our space hierarchy?

Solution

To hide the navigation globally, you can add the following CSS code into Look and Feel > Stylesheet:

Code Block
#navigationbarpro{display: none !important;}

As you can only configure the SubSpace Navigation in the menu bar, you need to additionally create a new user macro and choose "No macro body". Add the following code as template:

Code Block
## @noparams
<a class="openadminnavilink" href="#">Open SubSpace-Admin</a>
<script>
   jQuery(function(){
        jQuery(".openadminnavilink").click(function(){
            jQuery("#administratenavigation").click();
        });
   });
</script>

When adding this macro to a Confluence page you will see the configuration screen.

We have logged the following requirement requirements for further development:

Jira Legacy
serverCommunardo JiraSystem JIRA
serverId40ebf4e9248cedac-af73dc3b-381d31e7-8ee99dd4-1907c74966d1563b2796ce7a
keyCSSP-328
.

Hide navigation bar for logged-out users

To hide the navigation bar for logged-out users, you can add the following script code into: Confluence administration > Look and Feel > Custom HTML > Insert Custom HTML at end of the HEAD:

Code Block
<script>
document.addEventListener("DOMContentLoaded", function () { 
  if(AJS.Meta.get("remote-user") == "") {
      document.getElementById("navigationbarpro").style.display = "none"; 
  }
});</script>
Note

We strongly recommend you configure and test the script in a test system first, before adding it to your productive system.

Filter by label (Content by label)
showLabelsfalse
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "subspace-navigation" and type = "page" and space = "KB"
labels subspace-navigation navigation
Page Properties
hiddentrue


Verwandte Vorgänge

Jira Legacy
serverCommunardo JIRA
serverId40ebf4e9-af73-381d-8ee9-1907c74966d1
keySUPPORT-8754

Jira Legacy
serverCommunardo Jira
serverId40ebf4e9-af73-381d-8ee9-1907c74966d1
keyCSSP-328