From 8f5c9a747fcebb02bb99f5de272046411eb15370 Mon Sep 17 00:00:00 2001 From: David Jones Date: Sun, 22 Nov 2020 13:09:59 -0800 Subject: Add menu params Fixes #7951 --- docs/content/en/templates/menu-templates.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'docs/content/en/templates') diff --git a/docs/content/en/templates/menu-templates.md b/docs/content/en/templates/menu-templates.md index b39fe42a9..8893d7b5a 100644 --- a/docs/content/en/templates/menu-templates.md +++ b/docs/content/en/templates/menu-templates.md @@ -160,3 +160,23 @@ Here's an example: {{ end }} ``` + +## Using .Params in Menus + +User-defined content on menu items are accessible via `.Params`. + +Here's an example: + +``` + +``` + +{{% note %}} +With Menu-level .Params they can easily exist on one menu item but not another. It's recommended to access them gracefully using the [with function](/functions/with). +{{% /note %}} \ No newline at end of file -- cgit v1.2.3