From c3088c4fcdd8b6259e9f2aa77410e45c4312dc1e Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 4 Nov 2021 11:04:15 -0700 Subject: [PATCH] Add code toggle to menus page (#1568) Closes #1299 --- content/en/content-management/menus.md | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 6b89c44da..aefc99e00 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -12,7 +12,7 @@ menu: docs: parent: "content-management" weight: 120 -weight: 120 #rem +weight: 120 aliases: [/extras/menus/] toc: true --- @@ -48,31 +48,24 @@ If all you need to do is add an entry to a menu, the simple form works well. #### A Single Menu -``` ---- +{{< code-toggle >}} menu: "main" ---- -``` +{{< /code-toggle >}} #### Multiple Menus -``` ---- +{{< code-toggle >}} menu: ["main", "footer"] ---- -``` +{{< /code-toggle >}} #### Advanced - -``` ---- +{{< code-toggle >}} menu: docs: parent: 'extras' weight: 20 ---- -``` +{{< /code-toggle >}} ## Add Non-content Entries to a Menu @@ -115,7 +108,7 @@ In this example, the top level of the menu is defined in your [site `config` fil ## Params -You can also add user-defined content to menu items via the `params` field. +You can also add user-defined content to menu items via the `params` field. A common use case is to define a custom param to add a css class to a specific menu item. @@ -130,7 +123,6 @@ A common use case is to define a custom param to add a css class to a specific m class = "highlight-menu-item" {{}} - ## Render Menus See [Menu Templates](/templates/menu-templates/) for information on how to render your site menus within your templates.