Sidebar initialization from code