Left-Hand Sidebar
Customize the Left-Hand Sidebar
In ThemeBuilder, the sidebar is added as one macro that pulls in the default Confluence content for this area. If you want to change the sidebar, you need to rebuild the content in a new custom panel.
Replace the Default with a Custom Content Panel
In ThemeBuilder panel editor:
Add Custom Content to Your Panel
See ThemeBuilder Debugging Tools for help with this section.
Now that you have a blank space to work with, you may add custom content to the sidebar. Adding ?skin=root to the page URL allows us to go back to the default ThemeBuilder skin to see the existing content and decide what to add or exclude. You could also refer to a print or screenshot of the default page.
Scrolling Sidebar
To have a scrolling sidebar, you must wrap your content in this HTML div code:
<div class="acs-side-bar ia-scrollable-section">
...your content here
</div>Examples
These examples show you how to add a Pagetree menu and links to Space Tools, Pages, and Blogposts.
Pagetree Menu
The Pagetree macro displays simple vertical navigation that has many configurable parameters, including:
- A This Space Only search box
- Content from different spaces or the current one
- One-click Expand All or Hide All links.
Used here with the parameters root=@home and searchbox=true, it provides functional left-hand navigation as a custom sidebar. To create a Pagetree menu:
Page and Blogs Navigation
You can use the Web Section macro to place the sidebar navigation. This example uses a styled < hr /> for spacing between the custom sidebar elements.
.ia-fixed-sidebar hr {
margin-left: 14px;
width: 90%;
}Space Tools
You may want only to show the Space Tools link to certain users or groups, so this example will use the Panel Show macro only to display that link to Confluence Administrators. You can use any group in Confluence with Builder Show, Builder Hide, User, Decorator, Mode, and many others. ThemeBuilder Debug Comments will show many of these values in the source of a page.
The process here is similar to the one used to add the Pages and Blogs links, but we will wrap the menu macro in another macro that will only show the contents within the specified condition.
Summary
This is just a snapshot of the changes that can be made in this area. Combining menu macros and CSS styling can completely change how this area is used and valued within Confluence. Please let us know if you have any suggestions for tutorials we can add.