mvcsitemapprovider

MVC Site Map Provider and localization

折月煮酒 提交于 2019-12-20 07:18:04
问题 I've found out today that for my site i could use a SiteMap provider which i've downloaded from Github for the MVC3, as my web application is MVC3. Situation is following, my application is multilingual. I have a separate Library which contains all the resources. This Library is then added to my current project and everywhere where i need i use those resource files. Now i've implemented the site map provider: <mvcSiteMapNode title="$resources:Base,Home" controller="Home" action="Index"

MvcSiteMap: Dynamic node provider not reached

陌路散爱 提交于 2019-12-18 08:46:06
问题 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

MvcSiteMapProvider ISiteMapBuilder in conjunction with IDynamicNodeProvider

杀马特。学长 韩版系。学妹 提交于 2019-12-18 07:14:40
问题 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

How to localize the MvcSiteMapProvider

て烟熏妆下的殇ゞ 提交于 2019-12-18 06:57:37
问题 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

Globalization in MVCSiteMapProvider

这一生的挚爱 提交于 2019-12-17 20:40:00
问题 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

2 nodes in mvc.sitemap refers to 1 action with different parameters and they are not shown in breadcrumbs

徘徊边缘 提交于 2019-12-13 03:15:36
问题 I have a link "Ticket/Index" with different parameters. I created a menu with this link and its parameters using routing. The menu is shown correctly but the breadcrumbs don't show them! Mvc.sitemap: <mvcSiteMapNode id="Admin" title="Admin Menu" clickable="false" imageUrl="fa fa-th" > <mvcSiteMapNode title="Users" controller="User" action="Index" /> <mvcSiteMapNode title="Projetcs" controller="Project" action="Index" /> <mvcSiteMapNode title="Admin Tickets" controller="Admin" action="Index" /

MvcSiteMapProvider - Prevent display/serving sitemap.xml

…衆ロ難τιáo~ 提交于 2019-12-13 01:29:35
问题 I have a web app that uses MvcSiteMapProvider, but I don't want it to server /sitemap.xml as every page but the login page requires authentication, so there is no need for the public to see my sitemap. Is there a way to turn off the the /sitemap.xml file in config? Or a way to do it with RoutesConfig? 回答1: As per the documentation, if using internal DI, you can disable the /sitemap.xml endpoint using the MvcSiteMapProvider_EnableSitemapsXml setting. <appSettings> <add key="MvcSiteMapProvider

MVCSiteMapProvider Dynamic Node always returns the first node for all pages in the breadcrumbs

独自空忆成欢 提交于 2019-12-13 01:20:00
问题 I'm using the MVCSitemapProvider for my ASP.NET MVC 3 project, I have a dynamic node for a press release section. The issue I'm facing is that there are multiple nodes for a section and when I look at the site map it's working correctly as so: > Home > Static Node - Press Releases >Dynamic node - Press Release #1 >Dynamic node - Press Release #2 >Dynamic node - Press Release #3 However in the bread crumbs, if I navigate to the Press Release #2 page. the Breadcrumb will show the first node.

MvcSiteMapProvider preserved route parameter gives error “Could not resolve URL for sitemap node”

浪尽此生 提交于 2019-12-12 23:21:20
问题 I am working on a project in .Net MVC3 using MVC SiteMap Provider for creating the menus. Some of the menu nodes should be visible only when a specific route parameter (meetingId) is set, see example below: <mvcSiteMapNode controller="MeetingAttendants" action="Index" title="Attendants" preservedRouteParameters="meetingId" /> The meetingId parameter is a non-nullable int, that has no default value. The parameter is set when browsing information about a meeting. When loading a page where the

Dynamic sitemap from database doesn't display the nodes

喜你入骨 提交于 2019-12-12 17:04:33
问题 I have implemented this https://github.com/maartenba/MvcSiteMapProvider/wiki/Defining-sitemap-nodes-using-IDynamicNodeProvider Edit : this is my class public class MyDynamicNodeProvider : DynamicNodeProviderBase { public override IEnumerable<DynamicNode> GetDynamicNodeCollection(ISiteMapNode node) { webdata storeDB = new webdata(); var returnValue = new List<DynamicNode>(); foreach (var article in storeDB.SiteContents) { DynamicNode enode = new DynamicNode(); enode.Title = article