Showing
2 changed files
with
4 additions
and
2 deletions
| @@ -49,6 +49,7 @@ module Kanjai | @@ -49,6 +49,7 @@ module Kanjai | ||
| 49 | if current_page | 49 | if current_page |
| 50 | content = content.gsub('###link###', current_page.menu_url(session[:scheme], lang = nil).to_s) | 50 | content = content.gsub('###link###', current_page.menu_url(session[:scheme], lang = nil).to_s) |
| 51 | .gsub('###title###', current_page.lang_attributes(I18n.locale, :title).to_s) | 51 | .gsub('###title###', current_page.lang_attributes(I18n.locale, :title).to_s) |
| 52 | + .gsub('###active_class###', 'active') | ||
| 52 | end | 53 | end |
| 53 | subparts << content | 54 | subparts << content |
| 54 | when 'repeat' | 55 | when 'repeat' |
| @@ -160,7 +161,8 @@ module Kanjai | @@ -160,7 +161,8 @@ module Kanjai | ||
| 160 | if current_page | 161 | if current_page |
| 161 | attributes = replace_attributes_marker(attributes, { | 162 | attributes = replace_attributes_marker(attributes, { |
| 162 | '###link###' => current_page.menu_url(session[:scheme], lang = nil), | 163 | '###link###' => current_page.menu_url(session[:scheme], lang = nil), |
| 163 | - '###title###' => current_page.lang_attributes(I18n.locale, :title) | 164 | + '###title###' => current_page.lang_attributes(I18n.locale, :title), |
| 165 | + '###active_class###' => 'active' | ||
| 164 | }) | 166 | }) |
| 165 | end | 167 | end |
| 166 | subparts.send(item[:name].to_s, attributes) do |next_subparts| | 168 | subparts.send(item[:name].to_s, attributes) do |next_subparts| |