Hello,
I would like to check if there is a possibility to change the color of a page title automatically after a period of time. (I want to make this, part of a review process for expired documents and the only things that I can think of is the changing of the color page after 1 year - expiration date of the page/article)
Is this possible? Has anyone done this?
Confluence version:
There is one possibility to do that. You could write a javascript, which scrape the page to find the last modified date. Then this date you could compare with today, and if the date is more than 1 year ago, you just have to set the color of the title to red.
This means, that you won't be able to get all old pages, but you directly see it on the page itself. You can paste this code on the custom html (At end of the BODY) in the admin console.
<script>
var lastmodifiedDate = new Date(document.querySelector('.last-modified').text);
var today = Date.now();
var difference = today-lastmodifiedDate.getTime();
if(difference >= 31556952000){
document.querySelector('#title-text').children[0].style.color = 'red';
}
</script>
Hope this helps
Regards
Dominic
Hello Dominic,
I will take some time to check this method.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Catalin,
you can't do this with Confluence's out-of-the-box means and I don't think that there is some customization to do it. (I think that the color shouldn't just appear when viewing the page, but also in the sidebar, macro outputs and so on... And even if you achieved this, you'd still miss an overview of the outdated pages.)
Did you have a look at the Marketplace? Maybe you'll find something that fits your requirememt there...
Best regards,
Nicolai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nicolai,
Yes there is something on Marketplace, Comala Workflow, we are waiting for the pugin but it will take some time ... and meantime I need a solution for this.
Thank you!
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.