TTWeb Advanced Config 2. CMS Menu Config
A developer can customize the appearance and content of left-hand navigation for both the Content and Draft Settings areas of a draft. The files for setting these menus are, respectively,
- _cms_config/content_nav.yml
- _cms_config/settings_nav.yml
If not present, all of the menu items will just be displayed alphabetically.
Each file consists of a top-level key “items” which is an array of objects, each of which must have the key “id”.
For the Content area, the id key should be the file name of a model definition (without .json), a special key that’s one of
__pages__
(links to the Pages list)__menus__
(links to the site menu interface)__galleries__
(links to the gallery editor interface)
or another unique value used for grouping.
For the Settings area, the id key should be the file name of a content setting file in the _data directory (without .yml), a special key that’s one of
__environment_settings__
(links to the the main Draft Settings/Info page)__redirects__
(links to the redirects interface)
or another unique value used for grouping.
Each item in the array may also have a “label” key with localized content to specify the text in the menu. Each item in the array may also have a “items” key with a list of subitems to show in grouped section of the menu.
example _cms_config/content_nav.yml:
items:
- id: posts
- id: __pages__
- id: __menus__
- id: __galleries__
- id: attractions
- id: dining
- id: events
- id: offers
- id: room_content
label:
en: Room Content
items:
- id: rooms
- id: room_amenities
- id: room_bed_types
- id: reviews
example _cms_config/settings_nav.yml:
items:
- id: __environment_settings__
- id: __redirects__
- id: analytics
- id: brg_configuration
- id: conversion_plus
- id: hotel_settings
- id: seo
- id: social
- id: verification
More TTWeb tutorials
-
TTWeb Basics 1. Introduction to Content Models
Overview of TTWeb Content Models.
-
TTWeb Basices 0. Intro
TTWeb CMS and Site Structure overview
-
TTWeb Basics 2. Content Model Definitions
How to build structured data form interfaces in TTWeb
-
TTWeb Basics 3. Content Model Instances
How to use content models and generate dynamic pages in TTWeb
-
TTWeb Basics 4. Content Settings
User-editable global content and other site settings
-
TTWeb Basics 6. Site Menus
How to add and configure editable menus on a site
-
TTWeb Basics 5. Content Regions
Adding user editable content regions
-
TTWeb Basics 8. Redirects
Redirect file contents
-
TTWeb Basics 7. Localization And Internationalization
Editing and generating a site in multiple languages
-
TTWeb Liquid 1. Permalinks and IDs
Use the permalink filter to build URLs so they are formatted correctly and auotmatically update