Skip to content

Commit

Permalink
Defaulted VisibilityAffectsDescendants to the ISiteMap.VisibiltiyAffe…
Browse files Browse the repository at this point in the history
…ctsDescendants property in the MenuHelper and SiteMapHelper, as well as the SiteMapNodeModel. Changed drillDownToContent overloads to drillDownToCurrent of the MenuHelper so they are consistent between overloads (verfied they were controlling the same thing). Updated the documentation to include visibilityAffectsDescendants and drillDownToCurrent in the MenuHelper. Closes #261.
  • Loading branch information
NightOwl888 committed Feb 2, 2014
1 parent 742f8bb commit d486799
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using MvcSiteMapProvider.Web.Html.Models;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Web.Mvc;
using System.Web;
using System;
using System.Web.Mvc;
using MvcSiteMapProvider;

namespace MvcSiteMapProvider.Web.Html
Expand Down
119 changes: 66 additions & 53 deletions src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Html/MenuHelper.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace MvcSiteMapProvider.Web.Html.Models
{
Expand All @@ -17,7 +16,7 @@ public class SiteMapNodeModel
/// <param name="node">The node.</param>
/// <param name="sourceMetadata">The source metadata provided by the HtmlHelper.</param>
public SiteMapNodeModel(ISiteMapNode node, IDictionary<string, object> sourceMetadata)
: this(node, sourceMetadata, Int32.MaxValue, true, false, true)
: this(node, sourceMetadata, Int32.MaxValue, true, false, node.SiteMap.VisibilityAffectsDescendants)
{
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Web;
using System.Web.Mvc;
using MvcSiteMapProvider.Web.Mvc;
using System.Web;

namespace MvcSiteMapProvider.Web.Html
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using System.Web.Routing;
using MvcSiteMapProvider.Web.Html.Models;
using MvcSiteMapProvider.Collections.Specialized;
using System.Collections.Specialized;
using MvcSiteMapProvider.Web.Html.Models;

namespace MvcSiteMapProvider.Web.Html
{
Expand Down Expand Up @@ -305,7 +303,7 @@ public static MvcHtmlString SiteMap(this MvcSiteMapHtmlHelper helper, string tem
/// <returns>Html markup</returns>
public static MvcHtmlString SiteMap(this MvcSiteMapHtmlHelper helper, string templateName, ISiteMapNode startingNode, bool rootInChildLevel, SourceMetadataDictionary sourceMetadata)
{
return SiteMap(helper, templateName, startingNode, rootInChildLevel, true, sourceMetadata);
return SiteMap(helper, templateName, startingNode, rootInChildLevel, helper.SiteMap.VisibilityAffectsDescendants, sourceMetadata);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System.Collections.Generic;
using System.Text;
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using System.Web.Routing;
using MvcSiteMapProvider.Web.Html.Models;
using MvcSiteMapProvider.Collections.Specialized;
using System.Collections.Specialized;
using MvcSiteMapProvider.Web.Html.Models;

namespace MvcSiteMapProvider.Web.Html
{
Expand Down Expand Up @@ -217,6 +216,5 @@ private static SourceMetadataDictionary GetSourceMetadata(IDictionary<string, ob
result.Add("HtmlHelper", typeof(SiteMapPathHelper).FullName);
return result;
}

}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using System.Web.Routing;
using MvcSiteMapProvider.Web.Html.Models;
using MvcSiteMapProvider.Collections.Specialized;
using System.Collections.Specialized;

namespace MvcSiteMapProvider.Web.Html
{
Expand Down

0 comments on commit d486799

Please sign in to comment.