diff options
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/link_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index b40aa4b..2d31230 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -1,5 +1,14 @@ | |||
| 1 | module LinkHelper | 1 | module LinkHelper |
| 2 | 2 | ||
| 3 | def content_path_helper path_array | ||
| 4 | url_for( | ||
| 5 | :controller => :content, | ||
| 6 | :action => :render_page, | ||
| 7 | :locale => params[:locale] || I18n.locale, | ||
| 8 | :page_path => path_array | ||
| 9 | ) | ||
| 10 | end | ||
| 11 | |||
| 3 | def link_to_path title, path, html_options = {} | 12 | def link_to_path title, path, html_options = {} |
| 4 | if params[:page_path] | 13 | if params[:page_path] |
| 5 | active = (params[:page_path].join("/") == path.sub(/^\//, "")) | 14 | active = (params[:page_path].join("/") == path.sub(/^\//, "")) |
