Conditional statements in sidebar