API Docs for: 0.8.0
Show:

TopMenuService Class

Module: Theme
Parent Module: Services

Service for top menu navigation. NOTE: This is not for administrative pages.

Item Index

Methods

getAccountButtons

(
  • session
  • ls
  • [site]
  • cb
)
static

Retrieves the information needed to draw account buttons

Parameters:

  • session Object
  • ls Object

    The localization service

  • [site] String optional

    The current site

  • cb Function

    Callback function

getBootstrapNav

(
  • navigation
  • accountButtons
  • cb
)
static

Returns a bootstrap ready ul list for a nav element

Parameters:

  • navigation Object

    Navigation object

  • accountButtons Object

    Account buttons object

  • cb Function

    Callback function

getNavItems

(
  • options
  • cb
)

Parameters:

  • options Object
  • cb Function

getTopMenu

(
  • session
  • localizationService
  • [options]
  • cb
)
static

Retrieves the theme settings, navigation data structure, and account buttons.

Parameters:

  • session Object

    The current user's session

  • localizationService Localization

    An instance of Localization to translate default items

  • [options] Object optional

    An optional argument to provide more flexibility to the menu construction. (pass in site: siteUId to select the proper tenant)

    • [currUrl] String optional

      The current request URL.

  • cb Function

    Callback function that takes three parameters. The first are the theme's settings, the second is the navigation structure, and the third is the account button structure.