Open piotrpog opened 1 year ago
This code will throw error (note the "tag" Twig tag placed inside "nav").
{% set entries = craft.entries().section('pages').all() %} <ul id="nav"> {% nav entry in entries %} {% tag 'div' with { class: 'something', } %} some content {% endtag %} <li> <a href="{{ entry.url }}">{{ entry.title }}</a> {% ifchildren %} <ul> {% children %} </ul> {% endifchildren %} </li> {% endnav %} </ul>
4.4.13
8.1
No response
-
Hi, thanks for reaching out. I’ve just run it on Craft 4.4.13, and the template renders as expected without errors. What error are you seeing with this code?
What happened?
This code will throw error (note the "tag" Twig tag placed inside "nav").
Craft CMS version
4.4.13
PHP version
8.1
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-