-
Notifications
You must be signed in to change notification settings - Fork 136
Rendering
Simon Courtois edited this page May 2, 2014
·
2 revisions
To render the configured navigation the plugin uses renderers. You can use one of the built-in renderers or you can even provide your own Custom Renderers if you like. See Registering Renderers for more details.
The main method to render your navigation in the view is render_navigation. To tell the plugin which renderer to use you can
- set the renderer in the config/navigation.rb file, or
- specify the renderer in the render_navigation call
If you don't specify a renderer explicitly the plugin uses the list renderer by default, which renders the navigation as an HTML list.
Read on to render the navigation as
- HTML list: Renderer::List (default)
- Breadcrumbs: Renderer::Breadcrumbs
- Links list: Renderer::Links
- Text: Renderer::Text
- JSON: Renderer::Json
In addition to render the navigation, you also have the option to just render the name of the currently active item.
See Active Navigation Item Name for more details.