• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

php dynamic page title

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    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:

    Code:
    <% if(@cgi.path_info == '/' || @cgi.path_info == '/index') %>
    <title>The Index Landing Page for Your Site</title>
    <% end %>
    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!

    Comment

    Working...
    X