If statement to sidebar partial