I wonder how to define a relative URL which would trigger a Confluence action within the current instance.
An example:
Of course, I could also apply the same recipe to many administrative actions within documented procedures.
While experimenting, I've found the following syntax:
<a href="../../users/viewmylabels.action">My labels</a>
However, it will work only when there are no international chars in the page title.
When international chars are found in the page title, the URL used for display resembles the following:
https://our_base_url/confluence/page/viewpage.action?pageId=32802766
Therefore, the Base URL is only "one relative level back", and the syntax must be changed to this:
<a href="../users/viewmylabels.action">My labels</a>
Is there a "Base URL" syntax that works regardless of the page title?
Thanks,
Normand
Hi Normand,
I believe Confluence by default will not allow the relative link to be placed on the page, unless you create the link using html code.
However to use html code on a page, you must enable the module html macro on the add-ons page: https://confluence.atlassian.com/display/DOC/Enabling+HTML+macros
Hope it helps!
Hi Bruna, Wie get's?
YES, your answer is very useful. Would you allow me to take it one step further?
I've activated the HTML macro in our TEST instance, and I want to include a link to display all "personal" (my:) labels created by the current user in the current instance.
Let's say the TEST instance Base URL is [https://www.ourplace.com/confluence-TEST] and the PROD instance Base URL is [https://www.ourplace.com/confluence]. I want the link to point to the user's own {{my:labels}} listing of the confluence-TEST instance if he's browsing there, but of the confluence (PROD) instance if he's in PROD. (I refresh our TEST instance just by reloading the PROD data, so the same link will be used.)
So far I've tried a syntax such as the following:
{html} <a href="/users/viewmylabels.action">Click here</a> to see <b>your own</b> labels. {html}
But the resulting link I'm getting does NOT include the instance name, i.e. "confluence-TEST" or "confluence", so I don't have the FULL Base URL.
Do you know what syntax should be used to yield the link, prefixed with the COMPLETE Base URL (i.e. $BASEURL/users/viewmylabels.action)?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And... another step further?
I've found the following syntax:
<a href="../../users/viewmylabels.action">My labels</a>
However, it will work only when there are no international chars in the page title.
When international chars are found in the page title, the URL used for display resembles the following:
https://our_base_url/confluence/pages/viewpage.action?pageId=32802766
Therefore, the Base URL is only "one relative level back", and the syntax must be changed to this:
<a href="../users/viewmylabels.action">My labels</a>
Is there a "Base URL" syntax that works regardless of the page title?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry about the delay, I'm not too familiar with Atlassian Answers and karma management, so I'm not sure I'm treating this one properly...
I'm going to accept Bruna's answer (hope she gets her karma points!), which helped me a great deal forward (with the html macro) -- however, I still have no answer to my last question concerning the "relative link" topic.
Thanks anyway.
Normand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry I had to repeat my comment into the initial text, but my question has now slightly changed since I've been experimenting in parallel.
I still appreciate Bruna's previous answer (which was completely useful), but my solution is still incomplete.
Or maybe I don't understand how Atlassian Answers works -- maybe there's no good karma for completing an answer?
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.