diff options
| author | hukl <contact@smyck.org> | 2009-03-03 13:43:23 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-03 13:43:23 +0100 |
| commit | e72bd939439db5dd43ccc1a76975fafabaf2efa7 (patch) | |
| tree | 43e556730878c3eaae99ea0e52ad46a58341baa4 /app/helpers | |
| parent | 0566800f0f22829fcdb14c383a0388b4f1ca60f0 (diff) | |
setting the title tag dynamically
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 8 |
1 files changed, 8 insertions, 0 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 |
