While this issue isn't urgent, knowing the solution would be really beneficial to me. I've been following Ryan Bates' technique for adding titles to pages, and I must say, he's a fantastic pioneer and asset to the Rails community, don't you think?
In my application_helper file:
def title(page_title)
content_for(:title) { page_title }
end
In the layout file:
<head>
<title>foo.com - <%= yield(:title) %></title>
...
</head>
<body>
...
<h1 class="heading"><%= yield(:title) %></h1>
I'm attempting to modify the title by adding extra spaces and italicizing one of the words. My idea is to combine the title into a variable so that I can achieve this. I've attempted inserting
with no success. Similarly, using HTML <i></i>
didn't work either. Ideally, I'd like it to appear like this:
First Second Third
Is there a way to adjust the code below to achieve this desired title format?
<% ttl = "First Second Third" %>
<% title ttl %>
Thank you for your assistance.