Does anybody have a method to display a site-wide banner to only users not logged in? For example I want to use the method outlined in this article, but I only want anonymous users to see the banner.
https://confluence.atlassian.com/confkb/how-to-add-a-site-wide-banner-165609599.html
Hello,
You can achieve the effect by using the above instructions to add a banner, for example:
<div id="banner" class="aui-message closeable" style="display:none;">
<p class="title">
<strong>Error!</strong>
</p>
<p>And this is just content in a Default message.</p>
</div>
And then add some Javascript to display the banner only when the accessing user is anonymous, like this (should go in the after HEAD section):
<script type="text/javascript">
AJS.toInit(function(){
if (!AJS.params.remoteUser){
AJS.$('#banner').show();
}
});
</script>
Let us know how you go!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, working like a charm !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm trying it in Data Center version 8.6.2 and for me its doesn't work as expected. It shows banner despite user logged in or not.
There is my config. What is not correct here or this solution do not works anymore?
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.