Toggle visibility of sidebar sections based on whether the sidebar was rendered in the page