From 7540c5aabbb060e3daa02d8d74e4a33632378a8f Mon Sep 17 00:00:00 2001 From: Richard Henkenjohann Date: Sun, 22 Dec 2024 09:30:03 +0700 Subject: [PATCH 1/2] Document how to filter the navigation --- content/collections/tags/nav.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/collections/tags/nav.md b/content/collections/tags/nav.md index be5aaba2d..84dc885ab 100755 --- a/content/collections/tags/nav.md +++ b/content/collections/tags/nav.md @@ -110,6 +110,13 @@ variables: description: > Recursively output the entire contents of the `nav` tag pair. + - + name: '[condition parameters]' + type: 'arbitrary' + description: > + Pro Tip: You can also apply [conditions][1] + to the navigation tree! For example, try things + like `{{ nav hide_from_navigation:isnt="true" }}`. --- ## Overview @@ -325,3 +332,5 @@ You may improve performance of the `nav` tag in two ways: If you only need one level, set `max_depth="1"`. 2. Select the fields that you'll be using. If you're only going to be using `{{ title }}` and `{{ url }}` in the loop, set `select="title|url"`. + +[1]: https://statamic.dev/conditions From b59c8d1f4fa746ddf9a214e32c89280c265d5194 Mon Sep 17 00:00:00 2001 From: Richard Henkenjohann Date: Sun, 22 Dec 2024 09:32:59 +0700 Subject: [PATCH 2/2] Update nav.md --- content/collections/tags/nav.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/collections/tags/nav.md b/content/collections/tags/nav.md index 84dc885ab..c93c20686 100755 --- a/content/collections/tags/nav.md +++ b/content/collections/tags/nav.md @@ -36,6 +36,13 @@ parameters: type: array description: > Limits the fields that will be made available to the tag. Selecting fewer fields will improve performance. By default all variables will be selected. See [performance](#performance). + - + name: '[condition parameters]' + type: 'arbitrary' + description: > + Pro Tip: You can also apply [conditions][1] + to the navigation tree! For example, try things + like `{{ nav hide_from_navigation:isnt="true" }}`. variables: - name: is_published @@ -110,13 +117,6 @@ variables: description: > Recursively output the entire contents of the `nav` tag pair. - - - name: '[condition parameters]' - type: 'arbitrary' - description: > - Pro Tip: You can also apply [conditions][1] - to the navigation tree! For example, try things - like `{{ nav hide_from_navigation:isnt="true" }}`. --- ## Overview