Returned by [[B.siteNavigation]]

Example


let navItem = B.siteNavigation();

Hierarchy

  • SiteNavItem

Constructors

Methods

  • A string containing an HTML img tag which will display a larger BlueStep icon corresponding to the type of page.

    Returns string

  • A optional string value containing the URL of a larger BlueStep icon corresponding to the type of page.

    Returns string

  • A number indicating the number of child pages available from this SiteNavItem.

    Returns number

  • A string value containing the description of the page represented by this SiteNavItem.

    Returns string

  • A string containing the URL of the standard BlueStep icon corresponding to the type of page

    Returns string

  • A string containing an HTML img tag which will display the standard BlueStep icon corresponding to the type of page.

    Returns string

  • A string value containing the internal id of the page represented by this SiteNavItem.

    Returns string

  • A number containing the index of the current SiteNavItem in its parent's list of children.

    Returns number

  • A boolean value indicating whether this SiteNavItem represents the currently navigated page

    Returns boolean

  • A boolean value indicating whether this SiteNavItem is childless.

    Returns boolean

  • A boolean value indicating whether this is the root SiteNavItem. The root SiteNavItem represents the site itself, is at level 0, and has no parent.

    Returns boolean

  • A boolean value indicating whether this SiteNavItem represents the currently navigated page or one of its parent pages.

    Returns boolean

  • A string value containing the name/label of the page represented by this SiteNavItem

    Returns string

  • A number indicating the level of the page within the navigation tree. Primary navigation is level 1. Children of these navigation items are level 2, or secondary navigation. Children of level 2 are level 3 and so forth.

    Returns number

  • Finds an optional child page using the isFound callback function.

    Type Parameters

    • T

    Parameters

    • isFound: ((childNavItem) => boolean)

      Callback to indicated if child SiteNavItem was found

        • (childNavItem): boolean
        • Parameters

          Returns boolean

    • Optional fullTree: boolean

      When false - the default, do not search through all the pages's descendants.When true search until all sub-pages of the current page have been searched. The fullTree search does this via a depth traversal, meaning that if two children have the label that is being searched for, it will choose a page with a smaller 'level' value over a page with a higher 'level' value. If the pages are at the same level, it will choose the one that comes first.

    Returns Optional<SiteNavItem>

    Example


    // Find the first child that is a leaf child
    let optFoundChildNavItem = navItem.optFindBy(childNavItem => childNavItem.isLeaf(), true);```

    Example


    // Find the first child who's label is 'label'
    let optFoundChildNavItem = navItem.optFindBy(childNavItem => 'label' === childNavItem.label(), true);
    // or
    let optFoundChildNavItem = navItem.optFindByEquals('label', childNavItem => childNavItem.label());
    // or
    let optFoundChildNavItem = navItem.optFindByLabel('label', true);
  • Finds an optional child page using name - value custom properties

    Parameters

    • name: string

      The custom property name of the SiteNavItem to be searched. Since pages of different types can have the same property, and pages of the same type can have the same property if the name of the property begins with an under-bar, there is no guarentee that only one page will have the given property. In this case the first such page will be returned as determined by search.

    • value: string

      Custom property value

    • Optional fullTree: boolean

      See [[optFindByLabel]]

    Returns Optional<SiteNavItem>

    Example


    // Find the first child who's custom property is {'jack', 'box'}
    let optFoundChildNavItem = navItem.optFindByAltId('jack', 'box', true);```
  • Finds an optional child page. It will do an equals check on the callback function. Same as navItem.optFindBy(childNavItem => value === toT(childNavItem), fullTree);

    Type Parameters

    • T

    Parameters

    • value: T

      Value to search and check against

    • toT: ((childNavItem) => T)

      Callback to check if it equals value.

        • (childNavItem): T
        • Parameters

          Returns T

    • Optional fullTree: boolean

      See description in [[optFindBy]] with the same name.

    Returns Optional<SiteNavItem>

    Example


    // Find the first child who's description value is 'A description'
    let optFoundChildNavItem = navItem.optFindByEquals('A description', childNavItem => childNavItem.description(), true);```
  • Finds an optional child page. Same as navItem.optFindByEquals(value, childNavItem => childNavItem.id(), fullTree);

    Parameters

    • id: string

      The id of the SiteNavItem to be searched.

    • Optional fullTree: boolean

      See description in [[optFindBy]] with the same name.

    Returns Optional<SiteNavItem>

    Example


    // Find the first child who's id is 'id'
    let optFoundChildNavItem = navItem.optFindById('id' , true);```
  • Finds an optional child page. Same as navItem.optFindByEquals(value, childNavItem => childNavItem.label(), fullTree);

    Parameters

    • label: string

      The id of the SiteNavItem to be searched.

    • Optional fullTree: boolean

      See description in [[optFindBy]] with the same name.

    Returns Optional<SiteNavItem>

    Example


    // Find the first child who's label value is 'black label'
    let optFoundChildNavItem = navItem.optFindByLabel('black label' , true);```
  • An optional SiteNavItem representing the parent SiteNavItem of this SiteNavItem. The root SiteNavItem will have no parent.

    Returns Optional<SiteNavItem>

  • A string indicating the type of page represented by this SiteNavItem

    Returns string

  • A string value containing the URL of the page represented by this SiteNavItem.

    Returns string

Generated using TypeDoc