Method: Scrivito::BasicObj#toclist

Defined in:
app/cms/scrivito/basic_obj.rb

#toclist(*args) ⇒ Array<Obj>

Returns a list of children excluding the binary? ones unless :all is specfied. This is useful for creating navigations.

Returns:



637
638
639
640
641
642
# File 'app/cms/scrivito/basic_obj.rb', line 637

def toclist(*args)
  return [] if binary?
  toclist = children
  toclist = toclist.reject { |toc| toc.binary? } unless args.include?(:all)
  toclist.sort_by(&:id)
end