Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a link that will have in href exact text I provide, e.g. <a href="my_text">123</a>

Dawid Fibich August 4, 2016
 

2 answers

0 votes
Dawid Fibich August 4, 2016

Hi Thomas,

Thank you for your answer. Unfortunately it does not work sad
Result is:
<a href="http://my_text" class="external-link" rel="nofollow">123</a> 
"http://" is added and it prevent my link from working.

 

Best,
Dawid 

Thomas Schlegel
Community Champion
August 4, 2016

What kind of link do you want to add to your page?

Dawid Fibich August 4, 2016

It is a link with defined protocol which runs application on local machine. It allows user to start program with given parameters by a link.
It look somthing like this:
app-version:///?param=value&param2=value

Thomas Schlegel
Community Champion
August 4, 2016

OK, I see. This is quite tricky. 

I've tested with regular confluence links - they always produced some kind of app-version://<our-confluence-url>/?param...

I think, the best way is, to write a user defined macro that produces this link. Try something like this:

 

## This is an example macro
## @param param1:title=param1|type=string|required=true|desc=param1description
## @param param2:title=param2|type=string|required=true|desc=param2description
<a href="app-version:///?param=$param1&param2=$param2">123</a>

 

The macro produces the following output on the page:

<a href="app-version:///?param=$param1&amp;param2=$param2" rel="nofollow">123</a></p>

Dawid Fibich August 4, 2016

Doesn't it require administrator privileges?
Anyway I managed to solve my problem by using HTML macro.

Thank you for you help!

Thomas Schlegel
Community Champion
August 4, 2016

You're welcome smile

Yes, creating user defined macros requires admin privileges.

Using HTML macro is doing nearly the same, but for security reasons, we do not allow our users to add plain HTML to their pages.

0 votes
Thomas Schlegel
Community Champion
August 4, 2016

Hi Dawid,

creating a link on a Confluence page results in a form with two fields:

  • Address  (that is "my_text" in our example)
  • Link text (that is "123" in your example

Cheers

Thomas

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events