Module: Amalgam::PagesHelper

Defined in:
app/helpers/amalgam/pages_helper.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/amalgam/pages_helper.rb', line 3

def link_to_page(page,options={},&block)
  title = options.delete(:title) || page.title
  url   = options.delete(:url) || page_path(page.slug)
  condition = options.delete(:if)
  if condition.nil?
    link_to(title,url,options,&block)
  else
    link_to_if(condition,title,url,options,&block)
  end
end