diff --git a/config.codekit3 b/config.codekit3 index 61c328e..c10efb0 100644 --- a/config.codekit3 +++ b/config.codekit3 @@ -316,6 +316,25 @@ "rFN": 0, "uCM": 0 }, + "/docs/template-guides/navigation-field.md": { + "cB": 0, + "cS": 0, + "eF": 1, + "eL": 1, + "ema": 1, + "eSQ": 1, + "ft": 4096, + "hM": 0, + "oA": 1, + "oAP": "/docs/template-guides/navigation-field.html", + "oF": 0, + "oFM": 0, + "oS": 0, + "pHT": 0, + "pME": 1, + "rFN": 0, + "uCM": 0 + }, "/docs/template-guides/rendering-nodes.md": { "cB": 0, "cS": 0, diff --git a/docs/.sidebar.json b/docs/.sidebar.json index dec3a40..3d8c9fb 100644 --- a/docs/.sidebar.json +++ b/docs/.sidebar.json @@ -21,7 +21,8 @@ "children": [ "template-guides/available-variables", "template-guides/rendering-nodes", - "template-guides/breadcrumbs" + "template-guides/breadcrumbs", + "template-guides/navigation-field" ] }, { diff --git a/docs/template-guides/navigation-field.md b/docs/template-guides/navigation-field.md new file mode 100644 index 0000000..ced94a4 --- /dev/null +++ b/docs/template-guides/navigation-field.md @@ -0,0 +1,11 @@ +# Navigation Field + +You can use the navigation field to allow entries and other elements to select a navigation to show. In your templates, when calling the field (ie `{{ entry.navigationField }}`) you'll be returned a Nav Model. From this, you have access to the navigation's name, handle and any other settings. + +```twig +Here's the {{ entry.navigationField.name }} navigation: + +{{ craft.navigation.render(entry.navigation.handle) }} +``` + +If calling `{{ entry.navigation }}`, you'll be returned the handle of the navigation. \ No newline at end of file