For our confluence enviroment we needed to let anonymous users know that they needed to log in to comment, but I didnt want that message once they were logged in. Somehow the HTML macro didnt work in markupstyle in the footer itself.
I solved this as followed:
On a certain page with low traffic made a hidden excerpt. Here I used the HTML Macro with this code:
<script> if (document.getElementById("login-link").id === "login-link") { document.write("You are not logged in. Please do to leave a comment."); } </script>
Then used the wiki markup to include that excerpt in the footer.
The idea is that if someone is logged in, there is no login-link :)
As always there are multiple options to solve this.
Here is 1 ;-)
You can use this plugin to show or hide something in certain conditions. (yours will work)
In administration look for "sidebar, header and footer" and add following text
{show-if:special=@authenticated}You are not logged in. Please do to leave a comment{show-if}
Regards
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.