Layouts - Main

This is the navigation bar of the whole page

Main Models

  • numCart: Number of items in the cart, if there are any
  • languages: contains all the available languages for the page
  • pagesToEdit: contain the key of the pages for edition

Utility Functions

  • onGoHome(): go to home view
  • goToPageEdit(page.key): Direct to some of the valid edition pages for administrators and business owners
  • getLogState(): Returns true if there is a logged in user and false if not
  • onGoLogin(): Go to the login page
  • onGoMyProfile(): Go to the user profile page
  • onSignOut(): Close a user's session
  • selectLanguage(, lang.code): change the language on the whole page

Example of base theme

  1. onGoHome()
  2. goToPageEdit(page.key)
  3. pagesToEdit
  4. onGoMyProfile()
  5. onSignOut()
  6. onCart() if click, the 0 represent the calculated items un the cart with numCart
  7. selectLanguage to select one language of languages