|
|
I'm trying to render a separate header and footer menu based on properties within my content page model:
[EditableCheckBox("Show in Top Menu", 11, ContainerName = Tabs.Details, DefaultValue = true)]
public virtual bool IncludeInTopMenu { get; set; }
[EditableCheckBox("Show in Footer Menu", 12, ContainerName = Tabs.Details, DefaultValue = false)]
public virtual bool IncludeInFooterMenu { get; set; }
How do I filter on these properties from within a view using the Tree class:
@Html.Raw(N2.Web.Tree.From(N2.Find.StartPage, 2).Filters( ??? ).ClassProvider(i => i == Html.CurrentPage() || i == Html.CurrentPage().Parent ? "selected" : "").ExcludeRoot(true).ToString())
Thanks.
|
|
Coordinator
Jun 18, 2012 at 2:03 PM
|
It's usually a good idea to use Visible for menu filtering. Try this filter:
Content.Is.Custom(ci => ci.Visible && false.Equals(ci["IncludeInFooterMenu"]))
|
|
|
|
Thanks libardo. Worked perfectly.
|
|