Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to add a drop down next to Browse at the top of Confluence?

Karina Clemente
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.
October 2, 2012

How to add a drop down next to Browse at the top of Confluence? I would like to add a list of Quick Links there.

8 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
MatthewC
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.
October 2, 2012

Hi again Karina,

There is already a similar question here: https://answers.atlassian.com/questions/20479/how-do-you-create-drop-down-menus-from-the-header-field-in-confluence

Stefan's extension can now be found here: https://bitbucket.org/stefankohler/confluence-favourite-extension/src

the list of normal insertion points are here:

https://developer.atlassian.com/display/CONFDEV/Web+UI+Modules

but they don't list one next to the Browse menu. It may be possible to do something with jquery and creating it on the fly via the custom HTML setting....? I'd need to work it through.

MatthewC
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.
October 2, 2012

The jquery would be something like this, it's not right yet as I havem't got the drop down part correct yet but I'll come back to it tomorrow

AJS.toInit(function() {

   AJS.$('#header-menu-bar').append('<li class="normal ajs-menu-item"><a id="my-quick-links"  class="browse trigger ajs-menu-title" href="#"><span><span>Quick Links</span></span></a><div class="assistive ajs-drop-down"><ul  id="quick-links-menu-global" class="section-global first"><li><a href="http://www.atlassian.com"><span>Atlassian</span></a></li><li><a href="http://answers.atlassian.com"><span>Answers</span></a></li></ul></div></li>');

 });

Karina Clemente
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.
October 16, 2012

Hi Mathew, please dont forget about me :( We still have not been able to make it work since we need to first click on the new drop down and only then the rest of the the drop downs will work.

MatthewC
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.
October 24, 2012

Hi Karina, Sorry for the delay but I'm travelling in Australia at the moment.. will be back in a few weeks and get you an answer. If I can get some time at a laptop I'll work it out for you!

3 votes
Stephen Deutsch
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 18, 2013

Hi Everyone,

Based on the information from this page for adding links to the menu bar, I updated the code from this page for creating a quick links dropdown list for Confluence 5 (note: only tested in 5.1.3).

<script>
AJS.toInit(function(){
    AJS.$('.aui-header-primary ul.aui-nav').append('<li class="aui-nav aui-style-blocks" role="menu"><a id="my-quick-links" class="aui-nav-link aui-dropdown2-trigger" href="#" aria-haspopup="true" aria-owns="quicklinks-menu-link-content" title="Quick Links"><span>Quick Links</span><span class="aui-icon-dropdown"></span></a><nav id="quicklinks-menu-link-content" class="aui-dropdown2 aui-style-default" aria-hidden="true"><div class="aui-dropdown2-section"><ul id="quick-links-menu-global" class="aui-list-truncate section-leading first"></ul></div></nav></li>');

    AJS.$('#quick-links-menu-global').append('<li><a href="https://www.atlassian.com"><span>Atlassian</span></a></li>');
    AJS.$('#quick-links-menu-global').append('<li><a href="https://community.atlassian.com"><span>Community</span></a></li>');

});
</script>

The instructions for installing are the same: Confluence Admin, "Custom HTML" under look and feel, and copy-and-paste into "At the end of the HEAD" field.

Best of luck!

Stephen

 

MarkC
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.
October 9, 2013

This is very helpful! However, I encountered a problem with the above code. I already have a button that I am prepending on the navigation bar (it is simply a single button to a single location). When I tried to prepend the above (rather than append it), it displays before my other custom button.

If I change the order of the code, it displays correctly with the first button then the drop-down list. However, the first button is duplicated on the nav bar and the duplicate displays directly above the new drop-down list. Any idea how to correct that?

EDIT:

Turns out it was an issue with the style information I added to the prepend for the button. It was written as:

AJS.$('.aui-header-primary .aui-nav').prepend

When it should have had "ul" included:

AJS.$('.aui-header-primary ul.aui-nav').prepend

Stephen Deutsch
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.
October 27, 2013

For Confluence 5.3, there need to be some minor changes. I have included them below.

<script>
AJS.toInit(function(){
AJS.$('.aui-header-primary ul.aui-nav').append('<li id="linksMenu role="menu"><a id="my-quick-links" class="aui-nav-link aui-dropdown2-trigger" href="#" aria-haspopup="true" aria-owns="quicklinks-menu-link-content" title="Quick Links"><span class="browse">Quick Links</span><span class="aui-icon-dropdown"></span></a><nav id="quicklinks-menu-link-content" class="aui-dropdown2 aui-style-default" aria-hidden="true" ><div class="aui-dropdown2-section"><ul id="quick-links-menu-global" class="aui-list-truncate section-leading first"></ul></div></nav></li>');

AJS.$('#quick-links-menu-global').append('<li><a href="https://www.atlassian.com"><span>Atlassian</span></a></li>');
AJS.$('#quick-links-menu-global').append('<li><a href="https://community.atlassian.com"><span>Community</span></a></li>');

});
</script>

 

 

Like Svenja Lorenzen likes this
Nikola Bornová November 12, 2015

Thank you, Stephen, the version from Oct 28, 2013 seem to work even with Confluence 5.8.9

LijinR February 1, 2018

Hi Stephen Deutsch, which is the exact place where I can add this script so that the dropdown is visible in all pages?

Stephen Deutsch
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.
February 2, 2018

Hi Lijin,

This script goes in the Custom HTML section of the General Settings. No need to worry about plugins or anything like that ;)

2 votes
MatthewC
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.
October 3, 2012

Hi Karina,

Here you go, an easy solution you can use straight away! You need to add it to you Custom HTML so that it appears in your HTML header select "Browse -> Confluence Admin -> Look and Feel -> Custom HTML", and then add your HTML string in the "At End of HEAD

AJS.toInit(function(){

// Build the basic menu structure
AJS.$('#header-menu-bar').append('&lt;li class="normal ajs-menu-item"&gt;&lt;a id="my-quick-links" class="browse trigger ajs-menu-title" href="#"&gt;&lt;span&gt;&lt;span&gt;Quick Links&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="assistive ajs-drop-down"&gt;&lt;ul id="quick-links-menu-global" class="section-global first"&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;');

// add the links to the menu, one per line
AJS.$('#quick-links-menu-global').append('&lt;li&gt;&lt;a href="http://www.atlassian.com"&gt;&lt;span&gt;Atlassian&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#quick-links-menu-global').append('&lt;li&gt;&lt;a href="http://answers.atlassian.com"&gt;&lt;span&gt;Answers&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');

// rebuild the menus ready for use
AJS.$("#header-menu-bar").ajsMenu();

});

If you want to add more links, you can just add more lines and keep appending new links.

Karina Clemente
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.
October 4, 2012

HI Mathew, the code you provided above worked and now it looks something like this:

Browse kclemente Quick Links

However, if I first click on Browse the drop down does not work. I have to click first on Quick Links and only then the other drop downs work. Is there somehting else I need to add to the Custom HTML so that all three dropdowns work? Please let me know and really thank you for your help!

MatthewC
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.
October 4, 2012

Can I ask what version of Confluence and what browser you are using (&version)?

Karina Clemente
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.
October 4, 2012

We are using Confluence 4.2.8 and our users use Explorer 8

Steve Loft
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.
February 10, 2013

I've been trying this, and I have the same problem as Karina. Is there a solution, please? I'm using Confluence 4.3 and Chrome 24.0.1312.57 m.

corporalaris September 12, 2013

I fixed this by putting

// rebuild the menus ready for use
AJS.$("#header-menu-bar").ajsMenu();

at the beginning of the Custom HTML as well as at the end.

Now, I'm no expert, but that sounds like it wasn't refreshing the menu UNTIL you would click on the new element. Building the menu twice fixed it?

Full Code

&lt;script text/javascript&gt;
AJS.toInit(function(){
 
 // rebuild the menus ready for use
AJS.$("#header-menu-bar").ajsMenu();
 
// Build the basic menu structure
AJS.$('#header-menu-bar').append('&lt;li class="normal ajs-menu-item"&gt;&lt;a id="my-quick-links" class="browse trigger ajs-menu-title" href="#"&gt;&lt;span&gt;&lt;span&gt;Quick Links&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="assistive ajs-drop-down"&gt;&lt;ul id="quick-links-menu-global" class="section-global first"&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;');
 
// add the links to the menu, one per line
AJS.$('#quick-links-menu-global').append('&lt;li&gt;&lt;a href="http://www.atlassian.com"&gt;&lt;span&gt;Atlassian&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#quick-links-menu-global').append('&lt;li&gt;&lt;a href="http://answers.atlassian.com"&gt;&lt;span&gt;Answers&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
 
// rebuild the menus ready for use
AJS.$("#header-menu-bar").ajsMenu();
 
});
&lt;/script&gt;

0 votes
Mikael Mikkola September 7, 2015

Hi, I'd also like to have my menu just before "Browse", but I was not able to apply your instructions to the following menu code:

<script>

AJS.toInit(function(){

AJS.$('.aui-header-primary ul.aui-nav').prepend('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 4px 0px;"><span class="aui-icon aui-icon-small aui-iconfont-help" style="color:white"></span>Apua</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default"><div class="aui-dropdown2-section"><ul><li>test item</li></ul></div></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});

</script>

The code is mainly copied from this site with trial & error, and it produces a better (style) menu for my purposes, just the position on the page is not good (too far left).

BTW, if there is a way to reduce the space between the menus (this menu, my other menus, Browse, Spaces, etc.), I'd be grateful for such info too.

Thanks in advance!

Mikael Mikkola November 13, 2015

Solution: replace AJS.$('.aui-header-primary .aui-nav').append(' by AJS.$('#browseMenu').before(' works well in my C5.7. I found this solution at https://confluence.atlassian.com/pages/viewpage.action?pageId=358908020&focusedCommentId=433394931&#comment-433394931

it July 5, 2017

Could you please re-post the whole code? I am really wondering, why these menus are not onboard with confluence.

Mikael Mikkola July 12, 2017

In my previous comment, the "append" should have been "prepend". So the whole code is as follows. Here "Apua" is the additional menu item.

<script>

AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 4px 0px;"><span class="aui-icon aui-icon-small aui-iconfont-help" style="color:white"></span>Apua</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default"><div class="aui-dropdown2-section"><ul><li>test item</li></ul></div></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});

</script>

it July 18, 2017

Hi Mikael,

thank you for your answer. Unfortunately with this code, there is no button appearing. Additionaly I would like to know, how to create a clickable entry in the menu? How about more than one menu? Do you have more code samples?

Mikael Mikkola July 25, 2017

Hi, I'll post the code below twice(!), both as normal text and as a code block. I guess that one of them adds extra line breaks which may break the code unless you remove them, but maybe one does not.

This is my full original macro, technically. Just the contents are sanitated.

WARNING - EXTRA LINE FEEDS: copying here may have produced some extra line feeds or carriage returns or the like, which may break the working of the code. Therefore I recommend you to first try a small piece of the code, removing any additional line breaks. When it works, try more. 

WARNING - CONFLUENCE VERSION 5.7: This is for Confluence 5.7. I guess that a couple of lines may now be outdated but most details probably work in most Confluence versions. I guess that there is a 30% chance that drop-down menus no longer work in the most recent versions. Start from the simpler ones and remember to remove any additional line breaks.

WARNING - URLs: I changed the URLs to random URLs at .atlassian.com. Don't use them. I don't know where they land.

N.B. My all code posts in both forms have disappeared. I don't know why. They were here for a couple of minutes. Therefore, I'll try to post this with all URLs changed to .atlassian.com. If even that disappears, I'll try posting first just a small part.

 

Mikael Mikkola July 25, 2017

## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.mydomain.org/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');

AJS.$('.aui-header-primary .aui-nav').prepend('<a href="#OWN-wiki-button" aria-owns="OWN-wiki" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 5px; background-color:rgb(0,160,147);">Text 1</a><div id="OWN-wiki" class="aui-dropdown2 aui-style-default" style="min-width: 3%; max-width: 100%; background-color:rgb(240,240,240);">Text 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/npwYAQ" title="Menu 1: ...">Menu 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/zbEYAQ" title="Menu 2, ...">Menu 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/3bEWAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/X6kYGQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwfb" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwtr" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/6rUQAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/aqFL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/-54YFQ" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.address.com/something" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/abc.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLR" title="some tooltip">Some name</a><hr></td></tr></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLS" title="some tooltip">Some name</a></td></tr></table></td><td><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(242,255,251);">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/qICL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mIPG" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/t6PQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XrfQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Ooax" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/OY2L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MI2_AQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/J4XL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/dJVL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist1" title="Checklist 1 ...">Checklist 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/B46L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/TICL" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=12937742" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist3" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist4" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TOT/info1" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=8093858" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(254,250,255);">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,255,244); border-bottom:1pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/nIXH" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/rest" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NgZvAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/RAZrAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Priority" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/AREA/page" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/ARE/page2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MwZnAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8NAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8YZQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0p8YAB" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom: 1px solid gray;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Patenttikirjasto" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Julkaisupalvelut" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Oomx" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,250,241); border-bottom:2pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0QXy" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/VIoYAQ" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="border-bottom:0pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mrEYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MMKx" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/UIMYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/ioYKAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(255,249,246)">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XpFY" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yAAYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/4eoYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/dashboard.action" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Page" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom:1pt solid gray;">Some name</a></td></tr><tr><td><a href="http://www.one.org/index.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.abc.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.two.org/portal" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.def.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.ext.org" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.a.org/page#anchor" title="some tooltip">Some name</a></td></tr></table></td></tr></table></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>

Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.mydomain.org/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');

AJS.$('.aui-header-primary .aui-nav').prepend('<a href="#OWN-wiki-button" aria-owns="OWN-wiki" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 5px; background-color:rgb(0,160,147);">Text 1</a><div id="OWN-wiki" class="aui-dropdown2 aui-style-default" style="min-width: 3%; max-width: 100%; background-color:rgb(240,240,240);">Text 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/npwYAQ" title="Menu 1: ...">Menu 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/zbEYAQ" title="Menu 2, ...">Menu 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/3bEWAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/X6kYGQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwfb" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwtr" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/6rUQAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/aqFL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/-54YFQ" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.address.com/something" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/abc.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLR" title="some tooltip">Some name</a><hr></td></tr></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLS" title="some tooltip">Some name</a></td></tr></table></td><td><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(242,255,251);">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/qICL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mIPG" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/t6PQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XrfQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Ooax" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/OY2L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MI2_AQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/J4XL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/dJVL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist1" title="Checklist 1 ...">Checklist 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/B46L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/TICL" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=12937742" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist3" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist4" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TOT/info1" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=8093858" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(254,250,255);">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,255,244); border-bottom:1pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/nIXH" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/rest" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NgZvAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/RAZrAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Priority" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/AREA/page" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/ARE/page2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MwZnAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8NAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8YZQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0p8YAB" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom: 1px solid gray;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Patenttikirjasto" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Julkaisupalvelut" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Oomx" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,250,241); border-bottom:2pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0QXy" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/VIoYAQ" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="border-bottom:0pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mrEYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MMKx" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/UIMYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/ioYKAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(255,249,246)">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XpFY" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yAAYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/4eoYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/dashboard.action" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Page" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom:1pt solid gray;">Some name</a></td></tr><tr><td><a href="http://www.one.org/index.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.abc.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.two.org/portal" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.def.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.ext.org" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.a.org/page#anchor" title="some tooltip">Some name</a></td></tr></table></td></tr></table></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>
Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.mydomain.org/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.mydomain.org/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.mydomain.org/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');

AJS.$('.aui-header-primary .aui-nav').prepend('<a href="#OWN-wiki-button" aria-owns="OWN-wiki" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 5px; background-color:rgb(0,160,147);">Text 1</a><div id="OWN-wiki" class="aui-dropdown2 aui-style-default" style="min-width: 3%; max-width: 100%; background-color:rgb(240,240,240);">Text 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/npwYAQ" title="Menu 1: ...">Menu 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/zbEYAQ" title="Menu 2, ...">Menu 2</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/3bEWAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/X6kYGQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwfb" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Zwtr" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/6rUQAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/aqFL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/-54YFQ" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.address.com/something" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.mydomain.org/abc.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLR" title="some tooltip">Some name</a><hr></td></tr></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NSLS" title="some tooltip">Some name</a></td></tr></table></td><td><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(242,255,251);">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/qICL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mIPG" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/t6PQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XrfQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Ooax" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/OY2L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MI2_AQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/J4XL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/dJVL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist1" title="Checklist 1 ...">Checklist 1</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/B46L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/TICL" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=12937742" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist3" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/LISTS/Checklist4" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TOT/info1" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/pages/viewpage.action?pageId=8093858" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(254,250,255);">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,255,244); border-bottom:1pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/nIXH" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/rest" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/NgZvAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/RAZrAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Priority" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/AREA/page" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/ARE/page2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MwZnAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8NAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yp8YZQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0p8YAB" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom: 1px solid gray;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Patenttikirjasto" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/TIEPA/Julkaisupalvelut" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/Oomx" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,250,241); border-bottom:2pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/0QXy" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/VIoYAQ" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="border-bottom:0pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/mrEYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/MMKx" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/UIMYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/ioYKAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(255,249,246)">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/XpFY" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/yAAYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/x/4eoYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/dashboard.action" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.mydomain.org/confluence/display/SEC/Page" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom:1pt solid gray;">Some name</a></td></tr><tr><td><a href="http://www.one.org/index.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.abc.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.two.org/portal" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.def.org/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.ext.org" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.domain.org/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.a.org/page#anchor" title="some tooltip">Some name</a></td></tr></table></td></tr></table></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>
Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.atlassian.com/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
##Changed all domains to atlassian.com
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');

AJS.$('.aui-header-primary .aui-nav').prepend('<a href="#OWN-wiki-button" aria-owns="OWN-wiki" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 5px; background-color:rgb(0,160,147);">Text 1</a><div id="OWN-wiki" class="aui-dropdown2 aui-style-default" style="min-width: 3%; max-width: 100%; background-color:rgb(240,240,240);">Text 2</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/npwYAQ" title="Menu 1: ...">Menu 1</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/zbEYAQ" title="Menu 2, ...">Menu 2</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/3bEWAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/X6kYGQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/Zwfb" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/Zwtr" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/6rUQAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/aqFL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/-54YFQ" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="http://intranet.atlassian.com/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.atlassian.com/something" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.atlassian.com/" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://one.atlassian.com/abc.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/NSLR" title="some tooltip">Some name</a><hr></td></tr></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/NSLS" title="some tooltip">Some name</a></td></tr></table></td><td><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(242,255,251);">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/qICL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/mIPG" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/t6PQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/XrfQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/Ooax" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/OY2L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/MI2_AQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/J4XL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/dJVL" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/LISTS/Checklist1" title="Checklist 1 ...">Checklist 1</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/B46L" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/TICL" title="some tooltip">Some name</a><hr></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/pages/viewpage.action?pageId=12937742" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/LISTS/Checklist2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/LISTS/Checklist3" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/LISTS/Checklist4" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/TOT/info1" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/pages/viewpage.action?pageId=8093858" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(254,250,255);">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,255,244); border-bottom:1pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/nIXH" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/SEC/rest" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/NgZvAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/RAZrAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/SEC/Priority" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/AREA/page" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/ARE/page2" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/MwZnAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/yp8NAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/yp8YZQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/0p8YAB" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom: 1px solid gray;">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/TIEPA/Patenttikirjasto" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/TIEPA/Julkaisupalvelut" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/Oomx" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(254,250,241); border-bottom:2pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/0QXy" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/VIoYAQ" title="some tooltip">Some name</a></td></tr><tr><td>&nbsp;</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="border-bottom:0pt solid black;">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/mrEYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/MMKx" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/UIMYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/ioYKAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.atlassian.com/index/some_page" title="some tooltip">Some name</a></td></tr></table></td><td style="background-color:rgb(255,249,246)">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/XpFY" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/yAAYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/x/4eoYAQ" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/dashboard.action" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://confluence.atlassian.com/confluence/display/SEC/Page" title="some tooltip">Some name</a></td></tr><tr><td style="border-bottom:1pt solid gray;">Some name</a></td></tr><tr><td><a href="http://www.atlassian.com/index.html" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.atlassian.com/" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.atlassian.com/portal" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.atlassian.com/test" title="some tooltip">Some name</a></td></tr><tr><td><a href="https://www.atlassian.com" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://intranet.atlassian.com/index/some_page" title="some tooltip">Some name</a></td></tr><tr><td><a href="http://www.atlassian.com/page#anchor" title="some tooltip">Some name</a></td></tr></table></td></tr></table></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>
Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

Mikael Mikkola July 25, 2017

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
##Changed all domains to atlassian.com
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>

Mikael Mikkola July 25, 2017

The last comment above should be copied before the previous one in the macro. 

##First "?Help" menu, then "Main" menu.

Actually, there is just the "?Help" menu. I did not copy the other (long) menu, as all my long comments have disappeared. I'll still copy the two below as a code block in case that form copies better.

Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.atlassian.com/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
##Changed all domains to atlassian.com
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');


AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>
Mikael Mikkola July 25, 2017
## Edited from 2017-07-25 version
## Confluence 5.7, installed in February 2015.
## Just completely sanitated (PD/CC0), i.e., changed plain texts and comments and URLs. Macro code unchanged from the master version, so this should work technically in the same way and menu heights should be the same (not widths).
## @noparam

#set($globalHelper = $action.getHelper())
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )

##Tuning the left panel (navigation panel):
#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h1. [$spaceName | $spaceKey:]"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro(" h5. &nbsp;&nbsp;&nbsp; +[Search|MAN:search-instructions-page]+ from this wiki space (* = wild card):"))
$renderedhtml

#set($renderedhtml = $globalHelper.renderConfluenceMacro("{pagetree:searchBox=true|root=@home|startDepth=2}"))
$renderedhtml

##Misc tuning: header etc.
<style type="text/css">
/* Remove "Children pages" list from page bottoms */
#children-section{display:none;}
/* Smaller Header and footer. Footer 22px would make the header disappear when one clicks an anchor, such as the time stamp of a comment or something in a table of contents. */
body.theme-documentation #header {max-height: 32px !important;}
body.theme-documentation #footer { max-height: 37px !important; }
/* Make "expand" macro titles bold and add the > sign (which, however, seems to be the default anyway). */
.expand-control-text {font-weight: bold;}
.expand-control-icon:before { content: "\00a0";}
/* Remove space logo from in front of page names. I could easily remove it from the header too, but let's leave it there */
.space-logo { display:none !important; }
/* Modify the font and background color of the navigation panel (left panel). N.B. This should rather be in the Stylesheet if I wanted to have this affect the Edit window too. */
#splitter-sidebar h1{font-size:120%; background-color:#CC2727;}
#splitter-sidebar h1 a{color:#ffffff; font-size:100%;}
#splitter-sidebar h5{font-size:80%; color:#000000; margin-bottom:-9px !important; margin-top:1px !important; font-family:Helvetica, Arial, sans-serif; font-weight:Normal;}
</style>

##Header tuning:
<script>
$(document).ready(function() {
$('[id="help-menu-link"]').hide(); /* I remove the "(?)" menu right of the header's Search Box. */

$('[id="logo"]').next().prepend('<li><a href="https://confluence.atlassian.com/confluence/x/nmaYAQ" title="some tooltip" style="padding: 0px 3px 0px 0px;">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAN" title="Confluence Manual" style="padding: 0px 3px 0px 3px;">Manual</a></li><li><a href="https://confluence.atlassian.com/confluence/display/MAIN" title="Main space, contains ..." style="padding: 0px 3px 0px 3px;">Main Space</a>');

/* Removing the Spaces and People buttons. */
$('[id="space-menu-link"]').hide();
$('[id="people-directory-link"]').hide();
});
</script>

##New drop-down menus into the header.
##First "?Help" menu, then "Main" menu.
##N.B. in the "padding" parameter (e.g., menus) the margins are in the order: top right bottom left. Top 4 seems optimal: top>4 would increase header size, top<4 would not decrease it but would move the bottom arrows in the dropdown menu further down (2015, Confluence 5.7)
##Changed all domains to atlassian.com
<script>
AJS.toInit(function(){

AJS.$('#browseMenu').before('<a href="#mycompany-menu-link-content" aria-owns="mycompany-menu-link-content-APUA" aria-haspopup="true" class="aui-button aui-button-link aui-dropdown2-trigger aui-style-default" style="padding: 4px 0px 0px 0px;">Some name</a><div id="mycompany-menu-link-content-APUA" class="aui-dropdown2 aui-style-default" style="background-color:rgb(242,255,251);">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/fARdAQ" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/52CH" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/HY2L" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/ZWJG" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/O1Xn" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/z1SH" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/uwP_/" title="some tooltip">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/e9Cx" title="some tooltip">Some name</a></li></ul></div><div class="aui-dropdown2-section">Some name</a></li><li><a href="https://confluence.atlassian.com/confluence/x/_IRz" title="some tooltip">Some name</a></li></ul></div></div>');


AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>
Mikael Mikkola July 25, 2017

My all most macro copies have again disappeared. So I'll stop trying until I get further information on why this happens.

Anyway, I think that the above should work as such (at least the first one - and the second one at least if copied below the first one). Removing the "Main" dropdown menu should not have affected the code.

Line breaks between paragraphs should be OK and also these lines are separate in the latter macro code comment above (the "?Help" menu):

<script>
AJS.toInit(function(){

...

AJS.$('#mycompany-menu-link-content').ajsMenu();});
</script>

and any line starting with "##".

However, if you get LFs, CRs or the like elsewhere, maybe you should remove them.

The former macro code comment is in the "code block" form and at least its line breaks seem to be where they should.

However, it is also possible that any linebreak should have just LR or just CR or both (does anyone know what Atlassian macros require?). Check that if necessary.

Radesh M M February 1, 2018

Hi Mikael Mikkola, where did I add this script? I have atlassian-plugin.xml.

0 votes
Jim Bethancourt January 5, 2014

If you want to "sandwich" the new menu item between the People and Browse items, you can use a script similar to the following:

&lt;script type="text/javascript"&gt;
AJS.$('#people-directory-link').parent().after('&lt;li&gt;&lt;a href="/your/link/here" class="aui-nav-imagelink"&gt;Link Text&lt;/a&gt;&lt;/li&gt;');
&lt;/script&gt;

0 votes
Shaun September 10, 2013

Hi Smruti,

Thank you for your reply. In did very clever, I searched all class libraries trying to find them but never thought of Inspect Element feature :)

Thanks very much

Shaun

0 votes
Shaun September 9, 2013

Hi Smruti,

I am trying to fix custom dropdown menus with links to spaces and external pages and was thinking of using the menu you have made available here (or similar). Can I ask you where can I find a list of main classes and sub classes available under them? i.e. '#feed-builder-link' is obviously under the class '#help-menu-link-leading' which you hide?

Also if you have a sample of menu design with links to specific spaces and its children in ver 5, grateful if you share.

Thank you

Shaun

S September 9, 2013

Hi Shaun,

As of now, I am able to hide elements that have a specified id. Similarly, to append menu items, I need to have the id of the element to which the menu item is to be appended.

#help-menu-link-heading is an element with that id.

All the elements (and their properties) can be identified by just right clicking on them and selecting Inspect Element from the drop down.

Regards,

Smruti

0 votes
S June 26, 2013

Hi Karina and Steve,

I had similar problem and this code worked for me.

AJS.toInit(function(){
AJS.$("#header-menu-bar").ajsMenu();
// Build the basic menu structure
AJS.$('#header-menu-bar').append('<li class="normal ajs-menu-item"><a id="my-quick-links" class="browse trigger ajs-menu-title" href="#"><span><span>Quick Links</span></span></a><div class="assistive ajs-drop-down"><ul id="quick-links-menu-global" class="section-global first"></ul></div></li>');
// add the links to the menu, one per line
AJS.$('#quick-links-menu-global').append('<li><a href="http://www.atlassian.com"><span>Atlassian</span></a></li>');
AJS.$('#quick-links-menu-global').append('<li><a href="http://answers.atlassian.com"><span>Answers</span></a></li>');
// rebuild the menus ready for use
AJS.$("#header-menu-bar").ajsMenu();
});

Regards,
Smruti
Lakshmi July 16, 2013

Hi Smruti, is this code compatible with confluence 5.1.3? i treid and could not get any menu insteda i am getting same code at the top of the navigation bar.

I am literally looking for creation of dropdown/menu. please help me in this regard.

Thanks!

S August 22, 2013

Hi SumaRamki,

I was trying to have a similar code for 5.1.3. It rurned out to be tricky because there is no element with an id specified like we have the '#header-menu-bar' in confluence 4.3

In case you're willing to compromise, you can however hide all entries to the help menu and add entries according to your choice.

The following javascript worked for me in this regard

&lt;script type = "text/javascript"&gt;
AJS.toInit(function(){

// add the links to the menu, one per line
AJS.$('#help-menu-link-leading').prepend('&lt;li&gt;&lt;a href="https://yourlinkhere.com"&gt;&lt;span&gt;Menu 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#help-menu-link-leading').prepend('&lt;li&gt;&lt;a href="https://yourlinkhere.com"&gt;&lt;span&gt;Menu 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#help-menu-link-leading').prepend('&lt;li&gt;&lt;a href="https://yourlinkhere.com"&gt;&lt;span&gt;Menu 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#help-menu-link-leading').prepend('&lt;li&gt;&lt;a href="https://yourlinkhere.com"&gt;&lt;span&gt;Menu 4&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#help-menu-link-leading').prepend('&lt;li&gt;&lt;a href="https://yourlinkhere.com"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;');
AJS.$('#confluence-help-link').hide();
AJS.$('#keyboard-shortcuts-link').hide();
AJS.$('#feed-builder-link').hide();
AJS.$('#whats-new-menu-link').hide();
AJS.$('#gadget-directory-link').hide();

// rebuild the menus ready for use
AJS.$("#help-menu-link-leading").ajsMenu();
 
});

&lt;/script&gt;

You can choose to append or prepend depending on your needs. Both functions work.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events