Class NavigationTemplateHelper
- Namespace
- Dynamicweb.Frontend.Navigation
- Assembly
- Dynamicweb.dll
Helper for working with navigations in templates.
public class NavigationTemplateHelper
- Inheritance
-
NavigationTemplateHelper
- Inherited Members
Constructors
NavigationTemplateHelper(NavigationContext)
public NavigationTemplateHelper(NavigationContext context)
Parameters
context
NavigationContext
Methods
GetNavigationViewModel(NavigationSettings)
Creates a navigation view model based on the provided navigation settings.
public NavigationTreeViewModel GetNavigationViewModel(NavigationSettings settings)
Parameters
settings
NavigationSettings- Navigation settings used for generating the navigation and view model.
Returns
- NavigationTreeViewModel
- An instance of NavigationTreeViewModel
RenderNavigation(string)
Renders a navigation to a given template based on current context and default settings.
public string RenderNavigation(string templatePath)
Parameters
templatePath
string- Path to the template used for rendering the navigation, e.g. "menu.cshtml"
Returns
RenderNavigation(string, NavigationSettings)
Renders a navigation to a given template based on current context and the provided settings.
public string RenderNavigation(string templatePath, NavigationSettings settings)
Parameters
templatePath
string- Path to the template used for rendering the navigation, e.g. "menu.cshtml"
settings
NavigationSettings- Settings used for generating the navigation.