Module: TagLib

Includes:
CustomTags
Included in:
ApplicationHelper
Defined in:
lib/tag_lib.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) current_page



4
5
6
# File 'lib/tag_lib.rb', line 4

def current_page
	params[:title_sanitized] ? params[:title_sanitized] : nil
end

- (Object) items(*args)



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/tag_lib.rb', line 55

def items(*args)
  options = args.extract_options!
  options[:items] ||= @current_website.available_items.split(',')
  search = Search.new(setting_searching_params(:from_params => build_params(options)))
  items = search.do_search
  str = ""
  items.each do |item|
    str += "<li>" + (link_to item.title, "/#{item.class.to_s.underscore}/#{item.title_sanitized}") + "</li>"
  end
  return str
end

- (Object) page_body



8
9
10
# File 'lib/tag_lib.rb', line 8

def page_body
  liquidize_page_body(@item ? (render :partial => 'websites/show') : (render :partial => 'websites/page') )
end

- (Object) page_description



21
22
23
24
# File 'lib/tag_lib.rb', line 21

def page_description
  result ||= @site_page || @item || @current_website
  return result.description
end

- (Object) page_keywords



26
27
28
# File 'lib/tag_lib.rb', line 26

def page_keywords
  @site_page ? @site_page.keywords_list : ''
end

- (Object) page_title



12
13
14
15
# File 'lib/tag_lib.rb', line 12

def page_title
  result ||= @site_page || @item || @current_website 
  return result.title
end

- (Object) path



17
18
19
# File 'lib/tag_lib.rb', line 17

def path
  "/#{WEBSITE_FILES}/#{@current_website.title}"
end

- (Object) powered_by



38
39
40
41
# File 'lib/tag_lib.rb', line 38

def powered_by
  str = 'Powered By'
  str += link_to 'ThinkDRY : Blank Application', 'http://www.blankapplication.org'
end

- (Object) site_description



34
35
36
# File 'lib/tag_lib.rb', line 34

def site_description
  @current_website.description
end

- (Object) site_title



30
31
32
# File 'lib/tag_lib.rb', line 30

def site_title
  @current_website.title
end