Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

TitleHelper

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.

Example

This method should be used in your layout and your actions.

In your action:

<%= title "Edit user #{@user.name}" %>
# => <h1>Edit user Jan De Poorter</h1>

In your layout:

<head>
  <title><%= title :site_name => 'Foobar' %></title>
  # => <title>Edit user Jan De Poorter - Foobar</title>

Copyright © 2008 Jan De Poorter, released under the MIT license

Something went wrong with that request. Please try again.