0

How can I resolve the follwoeing error: "Facade\Ignition\Exceptions\ViewExceptionWithSolution Navigation [] not found"

Here is the code: partial:

    <nav class="py-12 max-w-4xl mx-auto">
    <div class="flex justify-center items-center">
        <a class="font-bold text-2xl" href="/">Home</a>
        <ul class="space-x-8">
            {{ nav: /collection:Pages}}
                <li><a href=" {{ URL }} "> {{ title }} </a></li>
            {{ /nav:collection:Pages}}
        </ul>
    </div>
</nav>

here the layout:

    <!doctype html>
<html lang="{{ site:short_locale }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{{ title ?? site:name }}</title>
        <link rel="stylesheet" href="{{ mix src='css/tailwind.css' }}">
    </head>
    <body class="bg-gray-100 font-sans leading-normal text-gray-800">
        <div class="mx-auto px-2 lg:min-h-screen flex flex-col items-center justify-center">
            {{ partial:nav }}
            {{ template_content }}
        </div>
        <script src="{{ mix src='/js/site.js' }}"></script>
    </body>
</html>
N69S
  • 16,110
  • 3
  • 22
  • 36
lolich
  • 23
  • 3

1 Answers1

0

You have a syntax error in your Antlers code. You have...

{{ nav: /collection:Pages}}
    <li><a href=" {{ URL }} "> {{ title }} </a></li>
{{ /nav:collection:Pages}}

When it should be:

{{ nav:collection:pages }}
    <li><a href=" {{ URL }} "> {{ title }} </a></li>
{{ /nav:collection:pages }}

You can review the documentation around the Nav Tag in the Statamic Documentation.

Duncan McClean
  • 130
  • 2
  • 11