Module: Doculab::TableOfContentsHelper

Defined in:
app/helpers/doculab/table_of_contents_helper.rb

Instance Method Summary collapse

Instance Method Details

#pageObject



24
25
26
# File 'app/helpers/doculab/table_of_contents_helper.rb', line 24

def page
  @page
end

#page_titleObject



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

def page_title
  parts = []
  
  if @page
    parts << @page.title
  end
  
  parts << "Chargify Documentation"
  
  parts.join(" - ")
end


16
17
18
19
20
21
22
# File 'app/helpers/doculab/table_of_contents_helper.rb', line 16

def toc_link(page)
  if page.doc
    link_to page.title, doculab_doc_path(page.permalink), :class => current_page?(page) ? 'current' : nil
  else
    page.title
  end
end