This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Working With Decorator Macros

All Versions

Confluence 3.0 Documentation

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 customising 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 coloured 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 customised 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.
RELATED TOPICS
User Macros
Enabling HTML macros
Editing and Removing macros
Enabling the html-include Macro
Writing Macros
Include Page Macro

Labels

customising-looknfeel customising-looknfeel Delete
velocity-related velocity-related Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.


Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 2.5 Australia License.