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

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.

0 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

778 views 23 12
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