This function sets the current breadcrumbs template.
Syntax
Labels.setBreadcrumbsLabelTempl(table, label, masterTable, page, language)
Arguments
table
the table name.
label
the breadcrumb template.
masterTable
the master table name (if we are on details table page at the moment).
language
the language of the breadcrumbs template. If the language parameter is not specified, the current language is used.
page
the page name. The page parameter accepts one of the following values:
Constants.PAGE_LIST
Constants.PAGE_PRINT
Constants.PAGE_ADD
Constants.PAGE_EDIT
Constants.PAGE_VIEW
Constants.PAGE_SEARCH
Constants.PAGE_EXPORT
Constants.PAGE_IMPORT
Constants.PAGE_REPORT
Constants.PAGE_RPRINT
Constants.PAGE_CHART
Constants.PAGE_MASTER_INFO_LIST
Constants.PAGE_MASTER_INFO_PRINT
Constants.PAGE_MASTER_INFO_REPORT
Constants.PAGE_MASTER_INFO_RPRINT
Constants.PAGE_MENU
Constants.PAGE_LOGIN
Constants.PAGE_REGISTER
Constants.PAGE_REMIND
Constants.PAGE_CHANGEPASS
Return value
No return value.
Example
By default the Order Details table uses the following breadcrumbs menu:
Home / Orders / Order Details [5187]
We want to change it, removing the "Order details" part:
Home / Orders / 5187
You can use any field from the details table here (OrderID) or from master table (master.OrderID)
Note: You can use this code in the AfterAppInit, AfterTableInit, BeforeProcess events.
We can use either:
Labels.setBreadcrumbsLabelTempl("order details", "{%OrderID}", "orders")
or
Labels.setBreadcrumbsLabelTempl("order details", "{%master.OrderID}", "orders")
See also:
•Labels/Titles API: getBreadcrumbsLabelTempl()
•Page Designer: Working with page elements
•Master-details relationship between tables