I'm creating my Page Template to be used when site managers create new Pages for our website. Using the ResourcePackage structure I am creating new base templates that will have the content placeholders. My goal is to not have a placeholder just for the Navigation widget, as I don't want other content items to be accidentally placed inside it. But I do want to use the Navigation widget to render my menu.
With MVC this should be as simple as calling an @Html.Action on the Navigation controller correct? When I use the code below, the correct Action and PartialView are loading, however, the Model for the PartialView is not aware of the context of my site.
, model =
NavigationModel() SelectionMode = PageSelectionMode.TopLevelPages, OpenExternalPageInNewTab =
, LevelsToInclude = 2)
The html for the structure of my navigation loads, but without any menu items (ie, pages).
<!-- BEGIN SIDEBAR MENU ITEMS-->
What am I missing? Why is the context of my site not be set properly when creating the NavigationModel? This works and loads correctly when the widget is dragged into a placeholder.