Building a dynamically updating sidebar for iframed dashboards

If you want to build a dynamic nav bar that updates to include new dashboards in a folder as they’re created for easy expansion of your embedded dashboards, this is the tutorial for you.

We can achieve this with our folder and document API, as well as some parsing of the results that are returned.

Step 1:

In Omni, create and configure the folder you want to hold all of the embed dashboards

Step 2:

Use the folder API to fetch the folder ID from this folder based on the name and URL path of the folder from step 1

Step 3:

Use the folder ID from the folder API as an input to the document API to return a paginated list of documents within that folder

Step 4:

Use the result of documents in that folder to populate the items that show up on the nav bar, as well as the dashboard path that is being used to display the dashboard in the embedded iframe

Step 5 (Optional):

Use the custom document identifier in Omni to set a naming pattern (e.g. ##-dashboard-name), which can be used to sort on the order of dashboards to display in the nav bar. It is suggested that the numbers are trimmed from any URL that may be displayed to the customer on the embedded page to present a cleaner customer facing configuration.

1 Like