How to edit link color based on target space

Frederik Lombaert July 29, 2024

We would like to have the links to a certain space appear in red color. Links to other spaces can appear in blue color. (Confluence Cloud)

Otherwise a user will only discover AFTER clicking on a link that it leads to a restricted space ("access denied").

So I'd basically like bulk format editing for links based on the space of the linked page.

Any advice?

2 answers

2 accepted

4 votes
Answer accepted
Jim Knepley - ReleaseTEAM
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 29, 2024

Hi @Frederik Lombaert 

In theory, if you create custom CSS for your site you can use an attribute selector to match links whose target contains certain keywords, for example:

a[href*="RESTRICTED"] {
color: red;
}

 

The link styling wouldn't have anything to do with actual space permissions, and would only look at the target URL.

Frederik Lombaert July 29, 2024

Hello @jim 

Thanks for your quick response!

It seems I will need the help of one of our developers for this solution.

We'll try it out and I'll let you know if we have further questions!

Like Amanda Barber likes this
1 vote
Answer accepted
Amanda Barber
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 29, 2024

I don't think this is possible with Confluence natively, and it appears to have a closed feature request.

I don't have experience with any of these, but there may be an app to suit your needs: https://marketplace.atlassian.com/search?category=Themes%20%26%20styles&hosting=cloud&product=confluence&query=link%20color

 

Frederik Lombaert July 29, 2024

Thanks @Amanda Barber !

I'll have a look at those apps too.

Like Amanda Barber likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events