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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,159 views 22 10
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