summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-03 13:43:23 +0100
committerhukl <contact@smyck.org>2009-03-03 13:43:23 +0100
commite72bd939439db5dd43ccc1a76975fafabaf2efa7 (patch)
tree43e556730878c3eaae99ea0e52ad46a58341baa4 /app
parent0566800f0f22829fcdb14c383a0388b4f1ca60f0 (diff)
setting the title tag dynamically
Diffstat (limited to 'app')
-rw-r--r--app/helpers/content_helper.rb8
-rw-r--r--app/views/layouts/application.html.erb2
2 files changed, 9 insertions, 1 deletions
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
10 page.user ? page.user.login : "Unknown author" 10 page.user ? page.user.login : "Unknown author"
11 end 11 end
12 12
13 def page_title page
14 if @page.title && @page.title != ""
15 "CCC | #{@page.title}"
16 else
17 "CCC | Chaos Computer Club"
18 end
19 end
20
13 # This method is an output filter for templates. It accepts any kind of text 21 # This method is an output filter for templates. It accepts any kind of text
14 # and checks for an <aggregate /> tag within it. If such a tag is found, its 22 # and checks for an <aggregate /> tag within it. If such a tag is found, its
15 # attributes are parsed and converted into parameters for the 23 # attributes are parsed and converted into parameters for the
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 828f5b2..58de77e 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -2,7 +2,7 @@
2<html xmlns="http://www.w3.org/1999/xhtml"> 2<html xmlns="http://www.w3.org/1999/xhtml">
3 <head> 3 <head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> 4 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
5 <title>CCC Template</title> 5 <title><%= page_title @page %></title>
6 <link rel="shortcut icon" href="/images/chaosknot.ico" type="image/ico" /> 6 <link rel="shortcut icon" href="/images/chaosknot.ico" type="image/ico" />
7 <%= stylesheet_link_tag 'styled' %> 7 <%= stylesheet_link_tag 'styled' %>
8 <%= stylesheet_link_tag 'safari' %> 8 <%= stylesheet_link_tag 'safari' %>