Class: Humpyard::Pages::VirtualPage

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/humpyard/pages/virtual_page.rb

Instance Method Summary collapse

Instance Method Details

#is_humpyard_dynamic_page?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/models/humpyard/pages/virtual_page.rb', line 8

def is_humpyard_dynamic_page?
  false
end

#is_humpyard_virtual_page?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/humpyard/pages/virtual_page.rb', line 12

def is_humpyard_virtual_page?
  true
end

#site_map(locale) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/models/humpyard/pages/virtual_page.rb', line 16

def site_map(locale)
  if page.in_sitemap
    {
      :url => page.human_url(:locale => locale),
      :lastmod => page.last_modified,
      :hidden => true,
      :children => page.child_pages.map{ |p| p.content_data.site_map(locale) }
    }
  else
    nil
  end
end