Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AUI Dropdown Submenu as Custom HTML?

Antonio Smith September 20, 2021

Hello,

My company would like to add a submenu between the spaces and create space menu/button in the top nav bar.

I tried out just adding the aui sub menu code to the custom html section but when viewing it placed the button above the nav bar instead of on the nav bar

<button class="aui-button aui-dropdown2-trigger" aria-controls="has-submenu">
Dropdown with submenu
</button>

<aui-dropdown-menu id="has-submenu">
<aui-section label="Links">
<aui-item-link href="https://amazon.com">Amazon</aui-item-link>
<aui-item-link href="https://apple.com">Apple</aui-item-link>
<aui-item-link href="https://facebook.com">Facebook</aui-item-link>
<aui-item-link href="https://google.com">Google</aui-item-link>
<aui-item-link for="recently-visited">Recently visited</aui-item-link>
</aui-section>
</aui-dropdown-menu>

<aui-dropdown-menu id="recently-visited">
<aui-section>
<aui-item-link href="http://atlassian.com">Atlassian</aui-item-link>
</aui-section>
</aui-dropdown-menu>

I realised it requires some javascript which I also tried but couldn't get past the initial but

 

Can anyone steer me in the right direction for achieving this?

Thanks

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2021

I will assume you have administrator access/rights. Go to the admin section, and look for Layout tab. You can edit the various templates that format Confluence. Look for View Default Decorator - main.vmd

You will notice that these layouts are written using Velocity (at last still in Version 6.x). If you don't find the eact location, it should point to the velocity macro that you need, and then you will have to hunt around in the file system to find the approriate macro.

I would strongly recommend setting up a dev server to try this out before working on the production server. ;-)

Antonio Smith October 21, 2021

Thanks we already use this for our regular menus. We are looking to do the same in the blue nav bar where the create button is.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events