Navigation menu options.

Hierarchy

  • Options

Properties

Methods

Properties

activate?: boolean

Whether to activate navigation links.

true by default.

Methods

  • Weighs matching navigation link.

    This method will be called for each navigation link on each current page update.

    By default:

    1. If the link path has neither hash, nor search parameters, then: 1.1. Checks whether page URL path starts with the link's one. 1.2. If so, then uses link path length as weight.
    2. If the link path has search parameters, but has no hash, then requires the page path to be the same as link's one, and page search parameters include all of the link's ones. The number of link search parameters plus the link path length is used as weight.
    3. If the link path has a hash, then requires the page path and search parameters to be the same as link's ones, and their hashes are treated as URLs. The weight is calculated by applying steps 1, 2, and 3 to hash URLs increased by the link path length and the number of search parameters.

    Ignores search parameters with names starting and ending with double underscores. Like __wesib_app_rev__.

    Returns

    Navigation link weight. Non-positive wight means the page URL doesn't match the link at all.

    Parameters

    • __namedParameters: {
          context: ComponentContext<any>;
          link: NavLink;
          menu: NavMenu;
          page: Page;
      }

    Returns number

Generated using TypeDoc