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 