ThemeBuilder for Confluence Server and DC

Wiki Markup to Storage Format

Table of Contents

Wiki Markup to Storage Format

HTML Macro Align Macro Menu Macros Menubar Menuitem Menu link Combined Menu Example Combined Menu Result Related Content Align Macro

Many macros can be converted to storage format using the Confluence conversion that happens when a page with wiki markup is saved, See David Simpson’s blog for more information on that process.

For deprecated ThemeBuilder macros that don’t convert using that method we will be listing their equivalent HTML or storage format in this page.

HTML Macro

When working with HTML or storage format in the ThemeBuilder panel editor you do not need to use the HTML macro.

So, for example, this wiki markup

Wiki Markup

{html}<ul id="mynav">{html}
{html}<li id="myId"><a class="myclass" href="#">My Link</a></li>{html}
{html}</ul>{html}

becomes

HTML

<ul id="mynav">
<li id="myId"><a class="myclass" href="#">My Link</a></li>
</ul>

Align Macro

The align macro should be replaced with an HTML span (for inline items) or div (for block items), together with a CSS class that is added as a style in ThemeBuilder Custom CSS. Adding the styling as a class means it can easily be reused for any HTML element that needs to be centred.

{align:center}My content{align:center}

becomes

<div class=”center”>My content</div>

Then add in the ThemeBuilder Custom CSS

.center {
    text-align: center;
}

Menu Macros

In ThemeBuilder 4 and earlier there were macros to help create a dropdown menu. When rendered these macros created their equivalent HTML elements and this is the key to translating wiki markup menu macros to storage format.

You can add valid HTML directly into any ThemeBuilder storage format panel.
  • Menubar = <ul>

  • Menuitem = <li>

  • Menulink = <a>

    • Similar in function to the 'compound-menuitem' macro which has also been deprecated

We have documented how to add resources in ThemeBuilder that will create a dropdown menu that looks similar to the one that was produced by the deprecated menu macros, and will refer to those instructions as part of this guide.

First we will cover the HTML equivalent of each component and then describe how to combine them.

The storage format version of the menulink macro is dependant on the function required.
Macro Name Wiki Markup HTML Comment

Menubar

menubar

div-and-ul

The Id is not required as it was with the wiki markup version but you may want to keep it in the parent <div> or the <ul> if you have styles associated with that Id.

The classes in the <div> are needed for the dropdown functionality.

Menuitem

menuitem

li

Menulink to External or Hard Coded Location

menulink_hard-coded

a-href

For Confluence pages you should use the <ac:link> macro as described below, or if you need to make use of ThemeBuilder flag logic you can use the Link macro.

Menulink to Confluence Page

menulink-to-confluence-page

ac-link

For Confluence pages always use the Confluence link function because it keeps pages linked even if they are moved. You can create these links by adding a link into a Confluence page then copying the storage format for the link.

Add a list menu on a Confluence page using the standard editor methods and then include or import that page into your menu.

Menulink to Relative Page

menulink-to-relative-navigation

panel-pagenav

Use the Page Navigation macro to create relative links.

Menulink to Home Page

menulink-to-home-page

panel-sitehome

The Panel Sitehome macro has options to link to the dashboard, site home and space home.

Menulink Site or Page Functions

menulink-to-profile

web-item-profile

For Confluence functionality you should convert menulink macros to single web-items or grouped web-sections using the destinations listed from Web Ui Links:
Web UI - Web Items
Web UI - Web Panels
Web Ui - Web Sections

Combined Menu Example

Using some of these examples we can create a dropdown menu with a combination of HTML and storage format.

example dropdown menu

<div class="adpt-dropdown horizontal">
<ul id="level-1">
<li>
<ac:macro ac:name="panel-sitehome">
<ac:rich-text-body>
Home
</ac:rich-text-body>
</ac:macro>
<ul id="level-2">
<li>
<a href="https://www.adaptavist.com/">
Adaptavist.com
</a>
</li>
<li>
<ac:link>
<ri:page ri:content-title="Mouse" ri:space-key="TR"/>
</ac:link>
</li>
</ul>
</li>
<li>
<ac:macro ac:name="panel-pagenav">
<ac:parameter ac:name="mode">firstchild</ac:parameter>
<ac:rich-text-body>
First Child
</ac:rich-text-body>
</ac:macro>
</li>
<li>
<ac:macro ac:name="web-item">
<ac:parameter ac:name="section">system.user/user-content</ac:parameter>
<ac:parameter ac:name="item">user-profile</ac:parameter>
<ac:rich-text-body>Profile</ac:rich-text-body>
</ac:macro>
</li>
</ul>
</div>

Combined Menu Result

combined-menu-result

See an example of a ThemeBuilder style dropdown menu that imports a standard Confluence list of links from another page.