I created a project that is defined by nodes using attributes, and I installed it in the web.config file to check for attributes, and it works great.
I do not use an XML file at all.
Now I want to add a dynamic node provider, how to do this?
Is there a way to do this without an XML file (.sitemap)?
I need to make sure that it is under the root that was installed in the code using the MvcSiteMapNodeAttribute attribute.
I read the documentation and I cannot figure out where to place this line:
<mvcSiteMapNode title="Details" action="Details" dynamicNodeProvider="Project.StoreDetailsDynamicNodeProvider, Prject" />
What action should he indicate? Also, as said above, the root element is defined using attributes, so my question is whether there is a way to avoid XML or, alternatively, an efficient way to declare XML (all the better) to enable my dynamic provider.
Update
I tried the following and the node provider has not yet reached (From HomeController.cs).
[MvcSiteMapNode(Title = "Home", Key = HomeMenuKey, DynamicNodeProvider = "Project.Namespace.NodeProvider, Assembly")] public ActionResult Index() { return View(); }
source share