Dynamically rendering sidebar