The menus are customised to make them easier to use and also allow space-level and user-level customisation...
Obviously, we need to start with the menubar macro which wraps the rest of the menu notation and turns it in to an active menu on-screen.
The menu notation is put in to the navigation panel, rather than the more usual menu panel, as we're using the menu panel to optionally display a banner message throughout the entire site.
We'll discuss each of the top-level menus in turn...
Inside the menubar macro the first menu, for logged in users at least, is the "My" menu:
We've used the show-to macro above so that only logged in users will see the "My" menu. Where possible we've used the compound-menuitem macro to link to standard features within Confluence such as the users' personal space, view history and profile, etc.
We've also used several features of our Community Bubbles plugin so that users can access some of the social networking features we've started to provide on the site. The Community Bubbles plugin provide several macros that output links to these features and we've wrapped those links in the menuitem macro to incorporate them in to the menu.
You can simplify the menu to:
Note: This menu assumes you've got a space with a key of "My".
The next menu is the "Home" menu. As the number of spaces on our site has grown, we found ourselves spending more time navigating to our favourite spaces and wanted a way to quickly access those spaces from anywhere in the site - we solved this problem as follows:
The first item on the menu allows the user to toggle the space as favourite.
The list of favourite spaces is then output directly in to the menu by the my-favourite-spaces macro (from the Community Bubbles plugin).
At the bottom of the menu we output a link to the dashboard so that people can always get to the full list of spaces if desired.
You can simplify the menu by using a static list of popular spaces:
If you look at our website and user guide spaces, you'll see menu items specific to those spaces.
We could have implemented this by creating additional layouts and hard-coding the additional items in to it, however this would have resulted in an ever-increasing number of layouts making ongoing maintenance increasingly difficult.
To solve this problem we decided to allow chunks of menu notation to be imported from the space itself as follows:
If there is a page within the space called "Space Menu" it will be imported in to the menu. If the page contains a list of links they will be converted in to menu items.
We decided to retain the standard top-level View and Edit menus as we've grown accustomed to them, as have our site visitors. However, we once again made several changes to the default View and Edit menus...
The first change was to hide the Edit menu from view. It contains quite a lot of menu items which are generally only used by Adaptavist. By hiding the menu we not only improve performance of the site but we also simplify the menu for normal users.
We then decided to massively simplify our View menu - most of the links in the default menu won't be needed as we're providing alternate ways of depicting them elsewhere.
The view menu was edited using the Menu Shortcut Macros options on the Menus Tab.
We wanted to ensure that there were links to our contact and support pages regardless of where you are in the site so we next added the Contact menu as shown below:
The remaining items on the menu needed to be shoved over to the right, which is done as follows:
Anything that appears after that menuseparator will appear on the right side of the menu. The classes specified in the separator are what causes it to behave differently from the normal separators.
We obviously need to allow users to sign up for an account, log in and log out. Normally these links are hidden away in the view menu, but we wanted to make them more obvious...
One of the neat things about the menu system and it's macros is that non-relevant links are automatically hidden. As such we don't need to worry about hiding the "sign up" and "log in" links for logged in users - Theme Builder knows they are not relevant and hides them.
Next, we wanted to include some export options - a very large portion of the public facing part of our site contains user guides, documentation and other content that people will often want in PDF or Word format. In addition, there are some export options we use internally...
Again, these links are usually tucked away in the View menu but we wanted to put them in a more easily accessible location.
Most of the links only show an icon and have an associated class (shrink-width) used for some design fudging which we'll discuss more in 4 - CSS.
exportMail link, however, rarely appears so we wanted it to be highly visible when it does - it's the only export link in this area of the menu to show a caption.
Finally, we wanted to provide some quick links for marking content as favourite and watching content:
The watch-menu macro displays an eye which lights up whenever you are either watching the current page or the entire space (or both). This allows you to see at a glance if the current content is being watched (regardless of how) whilst allowing fine-grained control from the two links contained within it.