Working With Decorator Macros

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Decorator Macros are Velocity macros which are used to draw complex or variable parts of the page such as menus and breadcrumbs when editing Custom decorators. Decorator macros can be inserted anywhere in your templates.

The macro is called by inserting a string of the form: #macroName("argument1" "argument2" "argument3").There are no commas between the arguments. Unless otherwise noted, these macros take no arguments.

NOTE: These macros will only work reliably when customizing main.vmd. They may not work in other Velocity decorators. Decorator macros will not work inside normal confluence pages.

Macro

Usage

#breadcrumbs()

Draws the "You are here" breadcrumbs list, like the one found above the page name in the default template.

#includePage(pageTitle)

Includes a confluence page with the specified title. If you have 2 or more pages with the same title across multiple spaces, this macro will include the page belonging to the space you are currently viewing.

#searchbox()

Inserts a search box into the page, like the one to the far right of the breadcrumbs in the default template.

#globalnavbar(type)

Draws the global navigation bar, as found in the top right-hand corner of the default template. The navigation bar can be displayed in two modes:

#globalnavbar("table")

Displays the navigation bar in its default mode: drawn as a table of links with colored backgrounds and mouse-over effects.

#globalnavbar("text")

Displays the navigation bar as series of text links separated by

|

characters.

#usernavbar()

Draws the user-specific navigation-bar. This bar contains the links to the user's profile and history, or to the login and signup pages if the user is not logged in.

#helpicon()

Draws the help icon, and link to the Confluence help page.

#printableicon()

On pages where a printable version is available, draws the printable page icon, linking to the printable version of the page. Otherwise, draws nothing

#pagetitle(class)

When you are viewing a page in a Confluence space, draws the name of the space that page is in. Otherwise, writes the word "CONFLUENCE".The "class" argument is the CSS class that the title should be drawn in. Unless you have customized your Confluence installation's CSS file, you should call this with "spacenametitle" as the class: #pagetitle("spacenametitle")

#poweredby()

Writes out the "Powered by Confluence" and Confluence version-number boilerplate found at the bottom of the default template.

#bottomshadow()

Draws the fading shadow-effect found at the bottom of the content area in the default template.

#dashboardlink()

Inserts a link to the dashboard page.

Last modified on Aug 22, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.