diff options
Diffstat (limited to 'lib/sidebars/concerns/container_with_html_options.rb')
-rw-r--r-- | lib/sidebars/concerns/container_with_html_options.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sidebars/concerns/container_with_html_options.rb b/lib/sidebars/concerns/container_with_html_options.rb index 873cb5b0de9..79dddd309b5 100644 --- a/lib/sidebars/concerns/container_with_html_options.rb +++ b/lib/sidebars/concerns/container_with_html_options.rb @@ -38,6 +38,16 @@ module Sidebars # in the helper method that sets the active class # on each element. def nav_link_html_options + { + data: { + track_label: self.class.name.demodulize.underscore + } + }.deep_merge(extra_nav_link_html_options) + end + + # Classes should mostly override this method + # and not `nav_link_html_options`. + def extra_nav_link_html_options {} end |