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="http://www.atlassian.com">9999</A>{html}

<A href="http://www.atlassian.com">9999</A>


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



Thanks!

Stephen

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 http://www.atlassian.com? 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 = 'http://www.google.com'; //&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;');
&lt;/script&gt;

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,027 views 15 13
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