From 07b86bf63180597627cdd86f054795e500d41ed8 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 15 Nov 2007 23:42:26 +0000 Subject: [PATCH] adding content titles git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@26 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/helpers/application_helper.rb | 9 ++++++++- app/views/layouts/application.rhtml | 12 +++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 648933c..d078b5e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,9 +3,16 @@ module ApplicationHelper # Returns the title for a page. This could be a Page title or something else. # def page_title + "BarleySodas :: #{controller.class.to_s.gsub(/Controller/, '')}" + end + + ## + # Returns a pretty name for the current chunk. + # + def content_title return @page_title if @page_title return @page.title if @page - "BarleySodas :: #{controller_class_name.gsub(/Controller/, '')}" + "BarleySodas" end ## diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 789786e..e6c7c0d 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -1,21 +1,16 @@ - - <%= page_title -%> - - + <%= page_title -%> <%= stylesheet_link_tag 'application', :media => 'all' %> <%= javascript_include_tag :defaults %> - -
<% flash.keys.each do |key| -%>
@@ -24,7 +19,7 @@ <% end -%> @@ -44,5 +39,4 @@
- - \ No newline at end of file +