Skip to content

Commit 98c6caf

Browse files
committed
Change structure nav examples to use url
1 parent b7161b3 commit 98c6caf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/templates/tags/structure-nav.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ If you want to display a few levels of your tree it might be simplest and most s
6565
status: "open|closed",
6666
show_depth: 2
6767
) {
68-
structure_url_title
68+
url
6969
entry {
7070
title
7171
}
7272
children {
73-
structure_url_title
73+
url
7474
entry {
7575
title
7676
}
@@ -92,7 +92,7 @@ A good way to display all levels of our navigation tree in Twig is by defining a
9292
{% macro showNav(item) %}
9393
{% import _self as self %}
9494
<li>
95-
<a href="{{ item.structure_url_title }}">{{ item.entry.title }}</a>
95+
<a href="{{ item.url }}">{{ item.entry.title }}</a>
9696
{% if item.children|length %}
9797
<ul>
9898
{% for child in item.children %}
@@ -128,7 +128,7 @@ In Blade we can use some PHP code to simplify recursively displaying the navigat
128128
])->render(function($item, $children, $depth) {
129129
return implode('', [
130130
'<li>',
131-
'<a href="'.$item['structure_url_title'].'">'.$item['entry']['title'].'</a>',
131+
'<a href="'.$item['url'].'">'.$item['entry']['title'].'</a>',
132132
$children ? '<ul>'.$children.'</ul>' : '',
133133
'</li>'
134134
]);

0 commit comments

Comments
 (0)