1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Move page title into a helper.

This commit is contained in:
Dan Barber 2014-12-09 10:37:54 +00:00
parent 8a1f0ebad5
commit b5743eac90
2 changed files with 8 additions and 1 deletions

View File

@ -1,2 +1,9 @@
module ApplicationHelper
def page_title(title)
if title.present?
"#{title} - Dan Barber Photography"
else
"Dan Barber Photography"
end
end
end

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title><%= @page_title + ' - ' unless @page_title.blank? %> Dan Barber Photography</title>
<title><%= page_title(@page_title) %></title>
<meta http-equiv="Content-Type" content="text/html" />
<meta name="keywords" content="photography, images, landscapes" />
<meta name="description" content="The photography portfolio of Dan Barber" />