Customizing Confluence's Login page -- check for current page in global decorator?

I am customizing my site's Login/Logout page. Most of the HTML that renders the page is in the Main Layout decorator (/admin -> Look and Feel -> Layouts -> Main Layout).

What I'd like to do is modify that decorator to check if the current page is the login page. If it is, I'd like to hide/show certain parts of the header and footer.

Does anyone have a quick way to check which page is being drawn, or maybe which action is being used to draw that page?

2 answers

This widget could not be displayed.

How about checking current web-adress via javascript/jquery and show/hide the parts of header and footer according to that via jquery as well?

$(document).ready( function() {
	var yourUrl = window.location.href;
	if(yourUrl.indexOf("whereYou.WantTo.Be") > -1) {

This widget could not be displayed.

I could be wrong but, I believe for the login page, the velocity template that generates it is the file call login.vm. It's found on the disk in the folder <confluence root install>confluence\login.vm. I don't believe that the login page is calling or being called from the main.vm file.

Additionally, you could check most pages by doing #if($page.title == "something") for pages layout. In the main layout I think it would just be #if($title == "something").

The VM file that defines some of the elements is layout.vm. But I define my header and footer in the global page layout decorator. So, yes, I conditionalized some of the layout items using:

#if ($sitemeshPage.getTitle().trim() == "Log In")


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

470 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you