Ruby Page Title in Common Header
And if anyone is at all interested here is a solution to providing a different page title on each dynamic page through a common header driven by Ruby:
It works but there is a down side. You have to add the above code in your header for each dynamic page generated. Not the prettiest way for sure and on a site with many pages will probably increase your code string to more than double its size in length.
But for now it is the best fix I can find. Ideally it would be great if there was a way it could read a class identifier off of a h2 page header. Not cracked that one though!
And if anyone is at all interested here is a solution to providing a different page title on each dynamic page through a common header driven by Ruby:
Code:
<% if(@cgi.path_info == '/' || @cgi.path_info == '/index') %> <title>The Index Landing Page for Your Site</title> <% end %>
But for now it is the best fix I can find. Ideally it would be great if there was a way it could read a class identifier off of a h2 page header. Not cracked that one though!
Comment