Daryl Hedley edited this page May 15, 2014 · 6 revisions


The sidebar enables the core modules to add views into the sidebar view. It handles views being removed and added. When creating a new sidebar view - use the SidebarView and extend.


Origin.sidebar.addView([view.$el], [optionsObject]); - Adds a view into the Sidebar.

The options object allows the following settings:

backButtonText - Text displayed at the top of the Sidebar view.

backButtonRoute - When the user clicks the back link this route will be fired. If no route is specified then the backButtonText will not display.

// Create the new view
var editorPageSidebarView = new EditorPageSidebarView().$el;
// Setup back button breadcrumb
var optionsObject = {
    "backButtonText": "Back to courses",
    "backButtonRoute": "/#/dashboard"
// Add to sidebar view
Origin.sidebar.addView(editorPageSidebarView, optionsObject);

By calling the sidebar view the views already opened inside the sidebar will be removed and cleaned up.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.