Custom Navigation Renderer

‹ Back

Ornament comes with a custom simple-navigation ornament_menu renderer:

<%= koi_render_navigation "header_nav", 
  renderer: :ornament_menu, 
  level: 1..2, 
  expand_all: true, 
  id_namespace: "header"


  • id_namespace option can be used to namespace the key ids that get added to each menu item. This option can be used to avoid duplicate ids between for example a header menu and a mobile menu.

The renderer gets generated in to app/renderers/ornament_nav_renderer.rb for easy customisation.