I have a layout page with the structure where I use navbar alongside @RenderBody().
later I made a method to generate pages and consequently navbar itself. thus, the navbar is not fixed anymore.
Then I made a partial view to loop through navbar items and display them in the same place in the layout. but I don't know how to import a model in the layout.
I'm wondering is there any tag helper that can trigger an action? to return the needed model
my layout looks like this
<html lang="en">
<head>
...
</head>
<body>
<header>
<partial name="_NavBar" model="????" />
</header>
<main class="mb-3">
<div class="container-fluid">
@RenderBody()
</div>
</main>
<footer id="footer" class="border-1 border-top border-primary">
<div class="container-fluid py-4">
<div class="copyright">
© Copyright
</div>
</div>
</footer>
@RenderSection("Scripts", required: false)
</body>
</html>
Any ideas to display this nav partial? or maybe using another tag helper? or any possible solution?

