From e72bd939439db5dd43ccc1a76975fafabaf2efa7 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 3 Mar 2009 13:43:23 +0100 Subject: setting the title tag dynamically --- app/helpers/content_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 9950bda..2cfba02 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -10,6 +10,14 @@ module ContentHelper page.user ? page.user.login : "Unknown author" end + def page_title page + if @page.title && @page.title != "" + "CCC | #{@page.title}" + else + "CCC | Chaos Computer Club" + end + end + # This method is an output filter for templates. It accepts any kind of text # and checks for an tag within it. If such a tag is found, its # attributes are parsed and converted into parameters for the -- cgit v1.3