Hierarchy: PP.TS.MetaHierarchy;
The Hierarchy property sets the current hierarchy.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and the following code must be added in the event handler that processes document opening:
var hierButton = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Remove the last link", //Text Click: PP.Delegate(onClickHier) }); function onClickHier() { //Get breadcrumb var breadCrumb = workbookBox.getDataView().getBreadcrumb(); //Get the current breadcrumb hierarchy var hie = breadCrumb.getHierarchy(); //Get array of levels in the breadcrumb hierarchy var levels = hie.getLevels(); //Remove one of the levels levels.pop(); //Refresh breadcrumb according to arguments breadCrumb.refresh(new PP.Mb.Ui.PropertyChangedEventArgs({TypeUpdateData: PP.TS.Ui.ViewTypeUpdate.MetaAttributeBreadcrumb})); }
After executing the example the Delete the Last Breadcrumb button is placed in the HTML page. Clicking this button deletes the last breadcrumb in the breadcrumb.
See also: