mvcsitemapprovider

Multilanguage menu for Mvc.sitemap with language in an Url

泄露秘密 提交于 2019-12-11 11:08:22
问题 My route: "{lang}/{controller}/{action}/{id}" {lang} here is: en-US, de-DE, etc Everything works right till moment I would like to switch language. When I switch language I am loosing part of the menu. my MenuHelperModel.chtml @model MvcSiteMapProvider.Web.Html.Models.MenuHelperModel @using System.Web.Mvc.Html @using MvcSiteMapProvider.Web.Html.Models <div class="hmenu"> <ul class="tabs"> @foreach (var node in Model.Nodes) { <li>@Html.DisplayFor(m => node)</li> } </ul> </div> @foreach (var

Multiple Navigation Paths to a Single Page

情到浓时终转凉″ 提交于 2019-12-11 09:57:45
问题 I'm trying to use the Multiple Navigation Paths to a Single Page feature from the MvcSiteMapProvider: https://github.com/maartenba/MvcSiteMapProvider/wiki/Multiple-Navigation-Paths-to-a-Single-Page And these are the 2 different navigation path that's pointing to the same resource: <mvcSiteMapNode title="Multi Analysis" controller="Report" action="MultiAnalysis" preservedRouteParameters="id"> <mvcSiteMapNode title="Analysis" controller="Report" action="Analysis" preservedRouteParameters="id

MVC SitemapProvider: NullReferenceException after refreshing(!) dynamic node pages

混江龙づ霸主 提交于 2019-12-11 08:42:03
问题 I am using the ASP.NET MVC SiteMapProvider 3.0 in my MVC3 page (.NET Framework 4.0). I switched from SiteMapProvider v2 to 3.0 during development but had the described problem in v2 as well. The SiteMapProvider is specified in the Web.config like this: <siteMap defaultProvider="MvcSiteMapProvider" enabled="true"> <providers> <clear/> <add name="MvcSiteMapProvider" type="MvcSiteMapProvider.DefaultSiteMapProvider, MvcSiteMapProvider" siteMapFile="~/Web.Sitemap" securityTrimmingEnabled="false"

MVCSiteMapProvider won't use Razor Templates for Menu

我的未来我决定 提交于 2019-12-11 03:09:14
问题 I'm enjoying using the well-made MVCSiteMapProvider through Nuget at the moment but I've hit a roadblock. I'm trying to modify the template for the @Html.MvcSiteMap().Menu() helper. The file I'm modifying is ..\Views\Shared\DisplayTemplates\MenuHelperModel.cshtml and no matter what change I make to the file, the template does not update when rendered. I've done a Find All with notepad++ and found that within MvcSiteMapProvider.dll there is two templates, one for classic asp.net and one for

Is this a good way to set up a 2-level-navigation (two menus, one for each level) with highlighting including breadcrumb using MvcSiteMapProvider?

醉酒当歌 提交于 2019-12-11 00:59:33
问题 I am just diving into the MVC SiteMapProvider and fiddling around with it, so this question is more about design than not being able to achieve what i want. I set up a simple MVC4 Web Application that uses MvcSiteMapProvider 3.3.4. What i want to achieve with it is to have a 2 level site navigation; one for the top level that is displayed horizontally and one for the level below that to be displayed vertically. The submenu must only display the nodes that are hierarchically below the

ASP.NET MVC SiteMap and/or Security Trimming

我怕爱的太早我们不能终老 提交于 2019-12-10 22:08:09
问题 Is there an equivalent in ASP.NET MVC to the SiteMap and Security Trimming Features found in Web Forms? I am just beginning to learn MVC and was looking for a solution to this to prevent going down the wrong path while learning. 回答1: Check ASP.NET MVC SiteMapProvider 来源: https://stackoverflow.com/questions/4647135/asp-net-mvc-sitemap-and-or-security-trimming

ASP.NET MVC SiteMap provider — How to 'hide' single items in the actual menu

一笑奈何 提交于 2019-12-10 03:29:06
问题 I am using the ASP.NET MVC SiteMap provider in a project, and it is working great. I am having a tough time trying to figure out how to hide a menu item however. The menu item I want to hide from displaying in the global navigation is my "Site Map" page. Now I know that there is something called a VisibilityProvider available to me on the mvcSiteMapNode - but I can't seem to figure out how to make it work. 回答1: First, I suggest you read this wiki page: Creating a Custom

How to add custom xml tags to sitemap.xml using mvcsitemapprovider?

烈酒焚心 提交于 2019-12-09 12:24:49
问题 Based on what Google defines in Video sitemaps , There are some xml tags should be added to sitemaps for videos, and it should be like this: <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> <url> <loc>http://www.example.com/videos/some_video_landing_page.html</loc> <video:video> <video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc> <video:title>Grilling steaks for summer</video:title> <video

NullReferenceException in MvcSiteMapProvider at production

◇◆丶佛笑我妖孽 提交于 2019-12-08 12:20:39
问题 The problem is I regularly get the error at the production site (ASP.NET MVC 3) but can't reproduce this error locally. The text of exception is: ExceptionType: System.NullReferenceException Message: Object reference not set to an instance of an object. StackTrace: at System.Collections.Specialized.NameObjectCollectionBase.BaseGetAllKeys() at System.Collections.Specialized.NameValueCollection.get_AllKeys() at MvcSiteMapProvider.MvcSiteMapNode.get_MetaAttributes() at MvcSiteMapProvider.Web

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

若如初见. 提交于 2019-12-08 03:30:34
问题 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