mvcsitemapprovider

Resource file for MVCSiteMapProvider

断了今生、忘了曾经 提交于 2019-12-07 19:16:18
问题 I'm using MVCSiteMapProvider for generating menus with localization for my application. My program works fine as long as the resource files for the menus are in the App_GlobalResources folder. When I move the resources into another folder, it gives an error mentioning not able to find the resources. I'm using $resources:Resource,menu_Home for accessing the resources in the MVC.sitemap file. I want to keep the resource files in a custom folder without storing them in the App_GlobalResources

MVCSiteMapProvider breadcrumbs incorrect parent node id

半腔热情 提交于 2019-12-07 13:30:49
问题 I have this sitemap: <mvcSiteMapNode title="Projects" controller="Projects" action="Index" key="Home" visibility="!*"> <mvcSiteMapNode title="Projects" controller="Projects" action="Index"> <mvcSiteMapNode title="Project" controller="Projects" action="Details" preservedRouteParameters="id"> <mvcSiteMapNode title="Session" controller="Sessions" action="Details" preservedRouteParameters="id"> <mvcSiteMapNode title="Edit Session" controller="Sessions" action="Edit" preservedRouteParameters="id"/

How to link to a child site-map file from a parent site map in ASP.NET MVC4 using MVCSitemapProvider?

一世执手 提交于 2019-12-06 15:35:56
I am using MVCSitemapProvider by Maarten Balliauw with Ninject DI in MVC4. Being a large-scale web app, enumerating over the records to generate the sitemap xml accounts for 70% of the page load time. For that purpose, I went for using new sitemap files for each level-n dynamic node provider. <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="$resources:SiteMapLocalizations,HomeTitle"

How can I add non-dynamic nodes to a dynamic node via attributes?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 09:14:05
问题 We want to add dynamic nodes for All People in our system. However we want to attach many child nodes to the dynamic node using attributes e.g. [MvcSiteMapNode(Title = "Accidents", ParentKey = "PeopleDetails", Key = "Accidents", PreservedRouteParameters = "personId")] We have about 40 nodes that should be a child of each person node E.g. People > Bob > Absences People > Bob > Holidays People > Bob > Training We would like to configure these using Attributes on the Action method e.g Add a Site

Resource file for MVCSiteMapProvider

℡╲_俬逩灬. 提交于 2019-12-06 05:26:57
I'm using MVCSiteMapProvider for generating menus with localization for my application. My program works fine as long as the resource files for the menus are in the App_GlobalResources folder. When I move the resources into another folder, it gives an error mentioning not able to find the resources. I'm using $resources:Resource,menu_Home for accessing the resources in the MVC.sitemap file. I want to keep the resource files in a custom folder without storing them in the App_GlobalResources folder. Can anyone help? it happens because of the following code in MvcSiteMapNode.Title property: var

MVCSiteMapProvider breadcrumbs incorrect parent node id

风格不统一 提交于 2019-12-05 19:22:47
I have this sitemap: <mvcSiteMapNode title="Projects" controller="Projects" action="Index" key="Home" visibility="!*"> <mvcSiteMapNode title="Projects" controller="Projects" action="Index"> <mvcSiteMapNode title="Project" controller="Projects" action="Details" preservedRouteParameters="id"> <mvcSiteMapNode title="Session" controller="Sessions" action="Details" preservedRouteParameters="id"> <mvcSiteMapNode title="Edit Session" controller="Sessions" action="Edit" preservedRouteParameters="id"/> </mvcSiteMapNode> </mvcSiteMapNode> </mvcSiteMapNode> <mvcSiteMapNode title="My Account" controller=

Load an XML sitemap into MvcSiteMapProvider based on user role

核能气质少年 提交于 2019-12-05 02:46:34
问题 I have installed v4 of MvcSiteMapProvider and now I want to load a sitemap dynamically. My needs are simple - load an XML sitemap on each page request based on the currently logged in user role eg. AdminSiteMap.xml and UserSiteMap.xml It appears that this can be done: Using asp.net MVCSiteMapProvider v4 with 2 sitemap https://github.com/maartenba/MvcSiteMapProvider/wiki/Multiple-Sitemaps-in-One-Application So basically you need to use a DI to achieve this ( overkill IMHO ). Any chance this

How do I make MvcSiteMapProvider create 1 SiteMap per Area?

纵饮孤独 提交于 2019-12-04 19:19:29
How do you make 1 SiteMap per MVC area and use MvcSiteMapNodeAttribute at the same time? Please have a look at this answer for help with setting up MvcSiteMapProvider with areas. The routes have to be configured using the correct conventions or it won't work right. However, that alone isn't going to address this requirement, because there is no default assumption made that you want to have a different SiteMap per area. The behavior of the internal DI container assumes that there will be 1 SiteMap per domain name, and that all of the SiteMaps in the application will be built using the same

How can I add non-dynamic nodes to a dynamic node via attributes?

独自空忆成欢 提交于 2019-12-04 15:04:46
We want to add dynamic nodes for All People in our system. However we want to attach many child nodes to the dynamic node using attributes e.g. [MvcSiteMapNode(Title = "Accidents", ParentKey = "PeopleDetails", Key = "Accidents", PreservedRouteParameters = "personId")] We have about 40 nodes that should be a child of each person node E.g. People > Bob > Absences People > Bob > Holidays People > Bob > Training We would like to configure these using Attributes on the Action method e.g Add a Site Map Attribute on Absences Index Action. Absences Index takes the PersonId of the parent nodes as its

How to use implicit localization with MVCSiteMap?

◇◆丶佛笑我妖孽 提交于 2019-12-03 16:11:27
I'm trying to use implict localization with MVCSiteMap but it's not working. Here's my sample Web.Sitemap : <?xml version="1.0" encoding="utf-8" ?> <mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true"> <mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Always" updatePriority="Normal"> <mvcSiteMapNode resourceKey="Products" title="Products" controller="Products" action="Index"> <mvcSiteMapNode title="Edit" controller="Products" action="Edit" /> </mvcSiteMapNode> <mvcSiteMapNode title="Categories" controller=