Auto-format a Confluence link in a template

Hi there,

I'm having a devil of a time getting a specific piece of functionality to work in the Confluence templating system. I wonder if folks can suggest some ways this can be done?

Essentially what I want to do is to create a template that has a bunch of parametrized fields that are filled in when the page is created, and from that construct a page that has all sorts of nice URLs and macros pointing to useful resources. This is to create a project dashboard for a particular release that is managed in JIRA and also Bugzilla.

So let's say I have a JIRA project called 'SDK' and I'm working on release '1.0' of the SDK; that's reflected into Bugzilla with a component name of 'My SDK'. What I'm trying to do is define a template with form-fill fields so the user can type in the project name, version, and bugzilla ID, and the resulting page will have the right title, text, and links. I've tried to use the standard @VAR@ syntax, but that does not appear to work in many cases:

Template markup like this:


appears to completely ignore the defined variable. Also

[@JIRAPROJECT@ @VERSION@ Requirements] - I want that to create a link to a new Confluence page that holds requirements for this project.

I'm also trying to do something like this in the template markup:


Leaving aside the problem that this forces a user to go look up the internal version ID in JIRA, this doesn't work either (the variable is ignored).

So I think the root of this problem is that @VAR@ variables in the template markup should be recognized anywhere, even if not preceded by a space or embedded in a link.

Note that one thing I tried to do was just add a bunch of spaces in the URLs and remove the starting brackets, figuring the page editor could just simply edit out the spaces, pre-pend a square bracket, and Bob's your uncle, they'd have a proper link. But of course the RTF editor makes that impossible because you can't just edit the link target using the text on the page.

That's definitely one feature request I'd have, short of restoring full wiki text support - allow people to edit specific types of content, like link aliases and targets, without forcing them to pop up a separate editor.

1 answer

0 votes

It's acting funky for me too. This is a known issue in Confluence 4 - it's buggy. You can weigh in with use cases here:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

258 views 2 10
Read article

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