Skip to content

Commit

Permalink
Add docs for main menu block
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Nov 15, 2024
1 parent 1b8db5e commit 46e7eec
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions docs/building_blocks_for_flexible_content.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,33 @@ A simple image.
tablet_2x: "landing_page/placeholder/tablet_2x.png"
```

#### Main Navigation
#### Main Menu

The landing-page top-level navigation. It supports a row of links, and sub-menus that will only appear on mobile (where the entire menu is compressed into a single drop-down). The only supported keys are the `type` key and the `navigation_group_id` key, which should point to an id of a [navigation group](#navigation-groups) to use for the menu items. Note that the styling of the first link is different, and it is assumed to be the homepage in a group of landing pages.
The landing-page top-level navigation. It supports a heading with a row of links.

##### Example

```yaml
- type: main_menu
button_label: "Landing page menu"
groups:
- heading: "First heading"
links:
- text: Landing page homepage very long text here to demonstrate wrapping
href: "/landing-page/homepage"
- text: Landing page homepage
href: "/landing-page/homepage"
- text: Landing page homepage
href: "/landing-page/homepage"
- heading: "Goals"
links:
- text: Goal 1
href: "/landing-page/goal-1"
```

#### Main Navigation (Legacy)

The legacy landing-page top-level navigation. It supports a row of links, and sub-menus that will only appear on mobile (where the entire menu is compressed into a single drop-down). The only supported keys are the `type` key and the `navigation_group_id` key, which should point to an id of a [navigation group](#navigation-groups) to use for the menu items. Note that the styling of the first link is different, and it is assumed to be the homepage in a group of landing pages.

##### Example

Expand Down

0 comments on commit 46e7eec

Please sign in to comment.