Pages
- Page
- A container for panes. A specific page can be referenced in a URL via the hash fragment.
In this document we will cover the following:
- How to create a page
- How to navigate to a page
- How to edit a page
- How to add children to a page
- How to create parameterized pages
- How to interact with pages programmatically
- How to delete a page
Create a page
- Click the plus button next to the list of pages in the toolbar
- Fill in the name of the page and hit Apply
Navigate to page
- Click on the name of the page you wish to navigate to
Edit page
- Click on the pencil icon of the page you wish to edit
Adding children to page
- Click on the plus button of the page you wish to add children to
- Save the children by clicking Apply
Parameterized pages
- Edit the page you’d like to make parameterized
- Toggle the ‘Parameter’ field to true and fill in the default value for the parameter
- Hit Apply
Note
The default value for the parameter will be used when navigating to the page
Programmatic interaction
The portal provides an interface via the CB_PORTAL
object for interacting with pages from within a parser, widget, or datasource.
Selecting a page programmatically
CB_PORTAL.selectPage("/states/TX/city/Austin")
Example use case:
- User selects a state from a list of states so the portal should navigate to a new page
Retrieving the current path parameters
CB_PORTAL.getPathParams() // will return {"state": "TX", "city": "Austin"} if the current path is "/states/TX/city/Austin"
Example use case:
- The current page changes so the portal should display data that is relevant to the URL parameters
- The portal needs to load the correct state on initial startup when the URL is “/states/TX/city/Austin”
Delete page
- Click on the trash icon of the page you wish to delete
- Confirm deletion when prompted