Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 781 Bytes

README.textile

File metadata and controls

35 lines (24 loc) · 781 Bytes

PageTitleHelper

PageTitleHelper is a very very simple helper which provides two helper methods for setting page titles. It supports localized titles.

Example

In the view layout (e.g. application.html.erb for instance):

<head>
	...
	<%= site_title "MySite" %>
	...
</head>

In a view, the title helper takes a parameter which can be either a String or a Symbol. In case of a Symbol, its value is sent first to I18n.t to be translated. In all cases, the page title is added to the <title/> tag after the site name.

<div id="content">
	...
	<%= title "Welcome !" %>
	...
</div>

Installation

rails install git://github.com/clarif/page_title_helper.git

Copyright © 2011 Fabrice Clari, released under the MIT license