Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Mar 6, 2019
1 parent 7cd2235 commit 757ec9d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
19 changes: 19 additions & 0 deletions config.codekit3
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion docs/.sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"children": [
"template-guides/available-variables",
"template-guides/rendering-nodes",
"template-guides/breadcrumbs"
"template-guides/breadcrumbs",
"template-guides/navigation-field"
]
},
{
Expand Down
11 changes: 11 additions & 0 deletions docs/template-guides/navigation-field.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 757ec9d

Please sign in to comment.