summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-02-12 21:33:39 -0800
committerelijah <elijah@riseup.net>2013-02-12 21:33:39 -0800
commit71ec0edea3f87fb69222dbb6fe025c2211402ca2 (patch)
tree5490323e8686df14165ccf5f37fa2d691fc99b88 /app/helpers/application_helper.rb
parent00c785b728c5d97335b87e3eb7d10b9ad0c46d35 (diff)
added capacity for pulling static pages from multiple directory source trees.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb8
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