Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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.