Conditionally hide navigation bar