The Navigation Link macro comes from the desire to provide links that have a flat look with menu style behavior and could be used in the Confluence sidebar and pages. Links that look like this can be seen in the Admin sidebar, e.g.,:
and in the standard sidebar (in Confluence 6, Global Look and Feel theme) for links to Pages, Blog, and space shortcuts:
- Macro Name: navlink
- Visibility: Visible to all users in the Macro Browser
- Macro Title: Navigation Link
- Description: Link suitable for navigation in sidebar.
- Categories: Navigation
- Macro Body Processing: No macro body
When using the macro in the sidebar, it is necessary to provide the path part of the URL. E.g.,
/display/MISC/MyPage, otherwise the link will something like
The Global Stylesheet needs some CSS settings to give the link set up by the macro its flat look and behavior:
This style information must be in a stylesheet because the
:link settings cannot be inlined in the
For use in the sidebar, I disable the sidebar links that can be configured using the "Space Tools → Configure sidebar" and customize the space-specific sidebar ("Space tools → Look and Feel"):
pointing to a special page called _sidebar which looks like:
*Because some of the content (e.g., contacts, spaces) in the _sidebar is reused in other spaces, the actual _sidebar page uses the IncludePage macro to pull in separate _contacts and _spaces pages which are in a different space set up for such things.
The result is quite aesthetically pleasing and works as desired:
Using the macro and _sidebar page, the sidebar benefits from a menu like look and feel and can also be tailored more fully than is possible using "Space tools → Configure sidebar".
Although the focus has been on the sidebar, the macro can be used in regular pages and be combined with, e.g., panels and tables, to provide a menu like look and feel.