Skip to content

Instantly share code, notes, and snippets.

@tmking
Created July 31, 2009 16:24
Show Gist options
  • Save tmking/159301 to your computer and use it in GitHub Desktop.
Save tmking/159301 to your computer and use it in GitHub Desktop.
def set_title(page_title)
content_for(:title) { "- #{page_title}" }
content_for(:h1) { page_title }
end
def set_page_title
@uri = request.request_uri.split("/")
if is_current_section('brands')
if @uri[2] then
" - Our Brands: #{@uri[2].capitalize}"
else
" - Our Brands"
end
elsif is_current_section('pianofinder') then
" - Find the Best Piano for You"
elsif is_current_section('education') then
" - Our Education Programs"
elsif is_current_section('service') then
" - Tuning and Service"
elsif is_current_section('quiz') then
" - The Ultimate Piano Quiz"
elsif is_current_section('about') then
" - About Us"
elsif is_current_section('stores') then
" - Store Locator"
elsif is_current_section('tenreasons') then
" - Ten Reasons to Buy From Us"
elsif is_current_section('institutional') then
" - Institutional Sales & Service"
elsif is_current_section('events') then
" - Upcoming Events"
elsif is_current_section('rentals') then
" - Rent a Piano"
elsif is_current_section('didyouknow') then
" - Did You Know?"
elsif is_current_section('chinese') || is_current_section('korean') then
" - For our #{@uri[1].capitalize} Customers"
elsif is_current_section('contact') then
" - Contact Us"
elsif is_current_section('restoration') then
" - Piano Restoration Center"
elsif is_current_section('showcase') then
" - Showcase Center"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment