Adding a hyperlink in title of Panel Macro

I'd like to add a hyperlink to the Panel Title portion of the Panel macro, so that users can click the panel's title and link off to another page.

I have tried using the following with no luck (as an example):

{html}<A href="">9999</A>{html}

<A href="">9999</A>

Does anyone know if this is possible using the Panel macro?



2 answers

1 accepted

2 votes
Accepted answer

Thanks Davin! I actually got it working by simply placing the page's title within [] brackets, similar to how it was done in Wiki Markup pre 4.0. Doing this automatically creates a hyperlink.

Davin Studer Community Champion Oct 02, 2013

Sweet! Good to know. Much easier.

Can you show me where to put the link Can you format the title font color?

To update the answer..

In the current version of hosted confluence the described solution does not work anymore.

You can use normal markdown in the title though.

This means [display text | url ] (without the extra spaces) will be rendered as link.

Susan Ostreicher Community Champion Oct 11, 2018

@Jonas Jurczok Thanks for this! I'm using Server, but it seems like the brackets don't work when there is a special character in the page title, and your suggestion solves that problem. 

0 votes
Davin Studer Community Champion Sep 23, 2013

You could do this inside an HTML macro.

&lt;script type="text/javascript"&gt;
var url = ''; //&lt;-- the url to visit
var panel = AJS.$('.panel .panelHeader')[0]; //&lt;--- [0] is the first panel, [1] is the second, and so on
AJS.$(panel).html('&lt;b&gt;&lt;a href="' + url + '"&gt;' + AJS.$(panel).text() + '&lt;/a&gt;&lt;/b&gt;');


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,440 views 110 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you