mvcsitemapprovider

MvcSiteMapProvider MVC5 CanonicalUrl

百般思念 提交于 2020-01-05 09:12:42
问题 I can't figure out what is wrong with MVC.SiteMap, it does not display CanonicalUrl when I check the page source. In _layout file I have the following: @Html.MvcSiteMap().CanonicalTag() @Html.MvcSiteMap().MetaRobotsTag() Here is MVC.Sitemap: <?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

How to structure sitemap with multiple sub sitemap?

会有一股神秘感。 提交于 2020-01-04 06:44:07
问题 I am using MVC4, MvcSiteMapProvider v3.2.1 (able to upgrade to v4 is needed). My problem is the application is huge. And I want to modularize the application and make the module pluggable. Since the sitemap is already huge, I want to make the sitemap also pluggalbe. Is there a way to structure the sitemap with a root sitemap loading nodes from multiple xml files when the application start? Here is the example to explain: The original sitemap: <?xml version="1.0" encoding="utf-8" ?>

How to structure sitemap with multiple sub sitemap?

梦想与她 提交于 2020-01-04 06:44:05
问题 I am using MVC4, MvcSiteMapProvider v3.2.1 (able to upgrade to v4 is needed). My problem is the application is huge. And I want to modularize the application and make the module pluggable. Since the sitemap is already huge, I want to make the sitemap also pluggalbe. Is there a way to structure the sitemap with a root sitemap loading nodes from multiple xml files when the application start? Here is the example to explain: The original sitemap: <?xml version="1.0" encoding="utf-8" ?>

How to render specific Sitemap section using mvcsitemapprovider

会有一股神秘感。 提交于 2020-01-03 21:30:06
问题 Lets say I have sitemap <mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Always" > <mvcSiteMapNode title="Home" controller="Home" action="Index" visibility="MenuHelper,!*"> <mvcSiteMapNode title="T1" controller="Home" action="T1" /> <mvcSiteMapNode title="T2" controller="Home" action="T2"/> </mvcSiteMapNode> <mvcSiteMapNode title="Help" controller="Help" action="Index"> <mvcSiteMapNode title="T1" controller="Help" action="T1" /> <mvcSiteMapNode title="T2"

Mvcsitemapprovider Multiple paths to the single page

醉酒当歌 提交于 2019-12-29 09:17:08
问题 I want to make breadcrump navigate 3 paths to the same page. Site map is at the bottom. <mvcSiteMapNode title="New" controller="Actions" action="NewActions" area="Promotion"> <mvcSiteMapNode title="Action" controller="Actions" action="ActionTabDetails" area="Promotion"/> </mvcSiteMapNode> <mvcSiteMapNode title="Continues" controller="Actions" action="ContinuesActions" area="Promotion"> <mvcSiteMapNode title="Action" controller="Actions" action="ActionTabDetails" area="Promotion" actionStatus=

Visibility of individual items in MvcSiteMapProvider?

丶灬走出姿态 提交于 2019-12-23 22:16:51
问题 I want to hide a certain page from menu, if the current session IP is in Israel. Here's what I've tried, but in fact the menu-item doesn't appear anywhere. I tested the GeoIP provider and it seems to be working, what am I doing wrong? Here's how I the menu is created and how I try to skip the items I don't want in the menu: public class PagesDynamicNodeProvider : DynamicNodeProviderBase { private static readonly Guid KeyGuid = Guid.NewGuid(); private const string IsraelOnlyItemsPageKey =

create breadcrumb with MvcSiteMap in mvc5

◇◆丶佛笑我妖孽 提交于 2019-12-23 05:12:14
问题 i want to create breadcrumb with MvcSiteMap in mvc5. i wrote below code. but i want to when i click on first , second , ... their Id pass to View. but it dose not work. i do it right? //Controller Name=News Home News first //id=1 second //id=2 third // id=3 About <mvcSiteMapNode title="Home" controller="Home" action="Index"> <mvcSiteMapNode title="News" controller="News" action="Index" key="News"> </mvcSiteMapNode> <mvcSiteMapNode title="About" controller="About" action="Index"/>

How to use Html.MvcSiteMap().Menu() with dynamic parameter?

。_饼干妹妹 提交于 2019-12-23 01:35:18
问题 I am using MvcSiteMapProvider 4.6.3, MVC 4. I want to use Html.MvcSiteMap().Menu() to generate the menu. The problem is I have multiple parameters in the URLs, which is changed based on user and document id. My Sitemap looks like: <mvcSiteMapNode title="Home" controller="Home" action="Index"> <mvcSiteMapNode title="Site Map Test" controller="SitemapTest" action="Index" area="" key="sitemaptestnode"> <mvcSiteMapNode title="Sub1" controller="SitemapTest" action="Sub1" area="" /> <mvcSiteMapNode

How do I make MvcSiteMapProvider create 1 SiteMap per Area?

夙愿已清 提交于 2019-12-22 01:21:41
问题 How do you make 1 SiteMap per MVC area and use MvcSiteMapNodeAttribute at the same time? 回答1: 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

MVC SiteMap Hiding a node from menuhelper, but display in sitepathhelper (breadcrumbs)

半城伤御伤魂 提交于 2019-12-21 17:57:12
问题 I'm trying to hide a node from my site menu, but display it in my breadcrumbs I'm following the tutorial here: https://github.com/maartenba/MvcSiteMapProvider/wiki/Advanced-Node-Visibility <mvcSiteMapNode title="Create Customer" controller="Customer" action="Create" area="Home" clickable="false" visibility="SiteMapPathHelper,!*"/> The above doesn't seem to work. It shows up both in my site menu, and breadcrumbs. 回答1: We created an OnlyBreadCrumbMVCSiteMapNodeAttribute. We decorate any code we