mvcsitemapprovider

MvcSiteMapProvider ISiteMapBuilder in conjunction with IDynamicNodeProvider

风流意气都作罢 提交于 2019-11-29 17:46:05
I'm using MvcSiteMapProvider 4.4.3 to dynamically build a sitemap from the database. I'm following this article: https://github.com/maartenba/MvcSiteMapProvider/wiki/Multiple-Sitemaps-in-One-Application because I'm using multiple sitemaps. This works and this is the basic structure which is returned: Home News Products About Contact One of the nodes ( /Products ) should be dynamically populated again based on different data. So for this I need a IDynamicNodeProvider implementation on the /Products node? ( please correct me if i'm wrong? ) Anyway, I think I do need the above. Documentation

MvcSiteMap: Dynamic node provider not reached

不羁岁月 提交于 2019-11-29 14:50:17
I created a project that the nodes are defined using attributes, and I set it in the web.config to scan for attributes, and it works fine. I don't use an XML file at all. Now I want to add a dynamic node provider, how do I do it? Is there a way to do it without the XML ( .sitemap ) file? I need to make sure it's under the root, which has been set in code using MvcSiteMapNodeAttribute attribute. I've read the documentation and I can't really figure out where to place this line: <mvcSiteMapNode title="Details" action="Details" dynamicNodeProvider="Project.StoreDetailsDynamicNodeProvider, Prject"

How to localize the MvcSiteMapProvider

徘徊边缘 提交于 2019-11-29 11:37:45
I tried to localize the MvcSiteMapProvider in almost any way, but I don't get it. As I figured out it works when you use app_globalresources folder, but that is not an option, if you work with MVC because MVC does not support them (at least the publish feature does not publish the files). Currently my resource file for the web site is in a file called words.resx (and words.de-DE.resx) which is located under a new folder called Resources. I've set the build action to "Embedded Resource", "Copy always" and changed the tool to PublicResXFileCodeGenerator. For the SiteMap, i don't care if it is

How to implement custom SiteMapNodeProvider

£可爱£侵袭症+ 提交于 2019-11-28 14:42:06
I am trying to adapt the MvcSiteMapProvider to create the breadcrumb based on some Information stored in a database. The answer in this post sounded promising so i implemented my own SiteMapNodeProvider. But then i didnt know how to wire things up so the newly implemented SiteMapNodeProvider is used instead of the static xml file ("Mvc.sitemap"). As i am using SimpleInjector in my project, i called the setup method in my already existent Injection-initialization code. public static void Initialize() { Injection.Global = new Container(); InitializeContainer(Injection.Global); Injection.Global

Globalization in MVCSiteMapProvider

亡梦爱人 提交于 2019-11-28 13:08:32
Hi have a sitemap on my mvc 4 application like this: <?xml version="1.0" encoding="utf-8" ?> <mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0" xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd"> <mvcSiteMapNode title="Users" controller="User" action="Index" area="" preservedRouteParameters="culture,projectid"> <mvcSiteMapNode title="New" controller="User" action="Create" area="" preservedRouteParameters="culture,projectid"/> <mvcSiteMapNode title="Edit"

mvc sitemapprovider hash fragment

耗尽温柔 提交于 2019-11-28 09:09:09
问题 I'm using sitemapprovider to implement breadcrumbs in my MVC4 application. I need to add an hash fragment val <mvcSiteMapNode title="Funds" controller="VcTransfer" action="Index/#" preservedRouteParameters=""> <mvcSiteMapNode title="Funds transfer" controller="VcTransfer" action="Index" preservedRouteParameters="id" /> </mvcSiteMapNode> I want the same result route as : Redirect(Url.Action("Index", "VcTransfer") + "#Network-tab"); I hope I've been clear, thanks in advance!! edit: the end

Using Multiple MvcSiteMaps

荒凉一梦 提交于 2019-11-28 07:26:47
问题 I've recently hit a road block trying to use the MvcSiteMapProvider. In my application, I have three distinct areas: Landing, Application and Administration. I currently have implemented the MvcSiteMapProvider and it works amazingly, but what I'm trying to do now - is use the Html MvcSiteMap Helper and specify a different map provider depending on the area that I'm in. So, when I'm: In the "Admin" area - I want to use the provider named "AdminSiteMapProvider". In the "Application" area - I

How to implement custom SiteMapNodeProvider

心不动则不痛 提交于 2019-11-27 08:46:45
问题 I am trying to adapt the MvcSiteMapProvider to create the breadcrumb based on some Information stored in a database. The answer in this post sounded promising so i implemented my own SiteMapNodeProvider. But then i didnt know how to wire things up so the newly implemented SiteMapNodeProvider is used instead of the static xml file ("Mvc.sitemap"). As i am using SimpleInjector in my project, i called the setup method in my already existent Injection-initialization code. public static void

MvcSitemapProvider - Add value to ignore in url resolver

假如想象 提交于 2019-11-27 08:23:36
问题 I have a link in my url-list which includes dynamic ids, i.e. /controller/action/id Currently it's not needed to have for each of my pages an own breadcrumb for example, better would be to jump back to the index action breadcrumb or to simple set a parent resolving url. Is there a simple solution or any tips how to solve this problem? Thank you in advance 回答1: There are 2 ways to use an "id" or any other route value with MvcSiteMapProvider. 1. Create a node for each "id" (usually this is done

MvcSiteMap generating a Menu without messing the breadcumbs

只谈情不闲聊 提交于 2019-11-27 05:23:21
I'm configuring my asp.net mvc 5 app to use MvcSiteMap library. So, far I could successfully configure the breadcumbs. However, the template for a menu is rather more complicated than the breadcumbs. I have the mustache version of the menu (I didn't show the ul tag): <li{{#class}} class="{{class}}" {{ />class}}>{{! print class name (active, open, etc) if it exists }} <a href="{{#link}}{{#createLinkFunction}}{{link}}{{/createLinkFunction}}{{/link}} {{^link}}#{{/link}}" {{#submenu?}} class="dropdown-toggle" {{ />submenu?}}> {{#icon}}<i class="{{icon}}"></i>{{/icon}} {{#level-1}} <span class=