Class: CamaleonCms::Category

Inherits:
TermTaxonomy
  • Object
show all
Defined in:
app/models/camaleon_cms/category.rb

Instance Method Summary collapse

Instance Method Details

#post_typeObject

return the post type of this category



24
25
26
27
28
29
30
31
32
33
# File 'app/models/camaleon_cms/category.rb', line 24

def post_type
  cama_fetch_cache('post_type') do
    ctg = self
    loop do
      pt = ctg.post_type_parent
      ctg = ctg.parent
      break pt unless ctg
    end
  end
end