If you referring to the code you showed (I merged your reply to your original topic), then it's the other tags that not being showed, because they are not registered yet when header.html is parsed. Simply put, you cannot use every tag that available in main template in header.html
To confirm that this fix works, try this:
{if lightbox}this only visible at lightbox page{endif lightbox}