Closed blachawk closed 6 years ago
Thank you for raising this issue, I'd be happy to help you out!
The "ExampleNavigation" partial we ship with the package takes a model of "IEnumerable
Once you've created your Meganav property on a doctype within the CMS, let's say you called it "mainMenu", you simply need to do the following to load in the Meganav to your page:
@Html.Partial("ExampleNavigation", Model.Content.GetPropertyValue<IEnumerable<MeganavItem>>("mainMenu"))
Or if you're using ModelsBuilder, it should be possible to simply pass Model.Content.MainMenu
like so:
@Html.Partial("ExampleNavigation", Model.Content.MainMenu)
I assume you checked out the "Integration guide" that's included within this repository to find the "ExampleNavigation" partial. On reflection this document isn't clear enough about how to implement the property – I will update the docs now!
Thanks again!
Many many thanks! - Your response was just what I needed. Issue solved. And thanks for the soon to come update on the document too.
You're very welcome! #h5yr
PM> Install-Package Cogworks.Meganav
But when I attempted to link the partial view,
ExampleNavigation.cshtml
which ships with meganav, onto my Home template like so......the rendered web page throws a fit and error logs says....
Do you have any ideas of how I should solve this issue?