diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b5bb657..2933bd1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -33,7 +33,7 @@ module ApplicationHelper if name.starts_with?('#') || name.starts_with?('http') path = name else - page = StaticPage.find(name) + page = site.find_page(name) if page label ||= page.title path = page_path(page) @@ -69,7 +69,11 @@ module ApplicationHelper def page_title if @page - @page.props.title || @page.title + if @page.props + @page.props.title || @page.title + else + @page.title + end else "" end |