We wanted to do this and came up with a jQuery based solution. It works well for us, as the coding is hidden from users in a page template. The gist of it is to define the link you want to apply in the normal way, but inside a "div" element (thanks to the Adaptavist Content Formatting macros plugin). This div has its style property set to display:none, so is invisible when the page is viewed normally. The jQuery code looks for this link and applies it to a status macro, based on the text that has been set for it.
Why go to the trouble of making a hidden link in this way? Since it relies on the normal Confluence functionality to do this, I see benefits if the target page was to undergo a change of name. In other words, we're not hard-coding the link.
Here's some sample code. If you have the plugin I mentioned and the html macro enabled in your environment, then just put this directly into a test page and you should see it works nicely. Note - the link is put on the entire status box, not just the text within it.
{div:statusboxes} {status:colour=Green|title=Wiki User Guide} {div} {div:userguidelink|style=display: none;} <Your link here> {div} {html} <script type="text/javascript"> jQuery(document).ready(function() { // Add links to status boxes jQuery('#statusboxes span:contains(Wiki User Guide)').hover(function(event) { jQuery(this).css( 'cursor', 'pointer' ); }); jQuery('#statusboxes span:contains(Wiki User Guide)').click(function(event) { window.location = jQuery('#userguidelink a:first').attr('href'); return false; }); }); </script> {html}
No, but using User Macros you could write your own and adding in the functionality.
You can find the VTL code for a version (I'm not sure how modern it is) for the code here: https://confluence.atlassian.com/display/CONF34/Writing+the+Status+User+Macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.