Type Alias: NavigationController<EC>
NavigationController<
EC
>:object
Controller that includes the resolved navigation and utility methods and attributes.
Type Parameters​
• EC extends EntityCollection
= EntityCollection
<any
>
Type declaration​
adminViews?​
optional
adminViews:CMSView
[]
Custom additional views created by the developer, added to the admin navigation
baseCollectionPath​
baseCollectionPath:
string
Default path under the collection routes of the CMS will be created
basePath​
basePath:
string
Default path under the navigation routes of the CMS will be created
buildCMSUrlPath()​
buildCMSUrlPath: (
path
) =>string
Convert a collection or entity path to a URL path
Parameters​
• path: string
Returns​
string
buildUrlCollectionPath()​
buildUrlCollectionPath: (
path
) =>string
Build a URL collection path from a data path
products
=> /c/products
products/B34SAP8Z
=> /c/products/B34SAP8Z
Parameters​
• path: string
Returns​
string
buildUrlEditCollectionPath()​
buildUrlEditCollectionPath: (
props
) =>string
Parameters​
• props
• props.path: string
Returns​
string
collections?​
optional
collections:EntityCollection
[]
List of the mapped collections in the CMS. Each entry relates to a collection in the root database. Each of the navigation entries in this field generates an entry in the main menu.
convertIdsToPaths()​
convertIdsToPaths: (
ids
) =>string
[]
Resolve paths from a list of ids
Parameters​
• ids: string
[]
Returns​
string
[]
getCollection()​
getCollection: (
pathOrId
,includeUserOverride
?) =>EC
|undefined
Get the collection configuration for a given path. The collection is resolved from the given path or alias.
Parameters​
• pathOrId: string
• includeUserOverride?: boolean
Returns​
EC
| undefined
getCollectionFromIds()​
getCollectionFromIds: (
ids
) =>EC
|undefined
Get the collection configuration from its parent ids.
Parameters​
• ids: string
[]
Returns​
EC
| undefined
getCollectionFromPaths()​
getCollectionFromPaths: (
pathSegments
) =>EC
|undefined
Get the collection configuration from its parent path segments.
Parameters​
• pathSegments: string
[]
Returns​
EC
| undefined
getParentCollectionIds()​
getParentCollectionIds: (
path
) =>string
[]
Retrieve all the related parent collection ids for a given path
Parameters​
• path: string
Returns​
string
[]
getParentReferencesFromPath()​
getParentReferencesFromPath: (
path
) =>EntityReference
[]
Retrieve all the related parent references for a given path
Parameters​
• path: string
Returns​
homeUrl​
homeUrl:
string
Base url path for the home screen
initialised​
initialised:
boolean
Is the registry ready to be used
isUrlCollectionPath()​
isUrlCollectionPath: (
urlPath
) =>boolean
Check if a url path belongs to a collection
Parameters​
• urlPath: string
Returns​
boolean
loading​
loading:
boolean
Is the navigation loading (the configuration persistence has not loaded yet, or a specified navigation builder has not completed)
navigationLoadingError?​
optional
navigationLoadingError:any
Was there an error while loading the navigation data
refreshNavigation()​
refreshNavigation: () =>
void
Call this method to recalculate the navigation
Returns​
void
resolveAliasesFrom()​
resolveAliasesFrom: (
pathWithAliases
) =>string
Turn a path with aliases into a resolved path
Parameters​
• pathWithAliases: string
Returns​
string
topLevelNavigation?​
optional
topLevelNavigation:TopNavigationResult
Configuration for the views that should be displayed at the top level of the navigation (e.g. in the home page or the navigation drawer)
urlPathToDataPath()​
urlPathToDataPath: (
cmsPath
) =>string
Convert a URL path to a collection or entity path
/c/products
=> products
/my_cms/c/products/B34SAP8Z
=> products/B34SAP8Z
/my_cms/my_view
=> my_view
Parameters​
• cmsPath: string
Returns​
string
views?​
optional
views:CMSView
[]
Custom additional views created by the developer, added to the main navigation