DefV / title_helper

A Rails view helper to keep <title> information in sync with your <h1>'s

This URL has Read+Write access

Mikael Hallendal (author)
Mon Jun 16 03:48:14 -0700 2008
Jan De Poorter (committer)
Mon Jun 16 03:48:14 -0700 2008
title_helper / README.rdoc
308dec78 » DefV 2008-04-17 Added plugin information (R... 1 TitleHelper
2 ===========
3
4 TitleHelper allows you to keep your <title> attributes synced with your <h1> attributes, which is more SEO friendly. This is 100% done in the view, which is different from some other plugins, who work with a title-method in the controllers.
5
6 Example
7 =======
8
9 This method should be used in your layout and your actions.
10
11 In your action:
12 <%= title "Edit user #{@user.name}" %>
13 # => <h1>Edit user Jan De Poorter</h1>
14
15 In your layout:
16 <head>
17 <title><%= title :site_name => 'Foobar' %></title>
18 # => <title>Edit user Jan De Poorter - Foobar</title>
19
20 Copyright (c) 2008 Jan De Poorter, released under the MIT license