summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-19 00:36:02 -0700
committerelijah <elijah@riseup.net>2013-07-04 04:02:06 -0700
commit1dcec6ed912b075f5bdaa069bb5725b0ff06fe41 (patch)
treea555c731c8b470a07df1a58e05cacd8f72a63f7b /app/helpers/application_helper.rb
parente37d1b1d621530dbec7b5b3b7ed17c24a48a727b (diff)
added html_title helper - use @title to set page title.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index db70109..a236a0a 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,6 +1,19 @@
module ApplicationHelper
#
+ # determine title for the page
+ #
+ def html_title
+ if content_for?(:title)
+ yield(:title)
+ elsif @title
+ [@title, ' - ', APP_CONFIG[:domain]].join
+ else
+ APP_CONFIG[:domain]
+ end
+ end
+
+ #
# markup for bootstrap icon
#
# http://twitter.github.io/bootstrap/base-css.html#icons