Sha256: 12370c1a2568375c9b7456426df8fb944449b5a281e3f090cbcef50dd192104f
Contents?: true
Size: 560 Bytes
Versions: 2
Compression:
Stored size: 560 Bytes
Contents
module TaggableHelper def available_pointer_pages() root = Page.respond_to?(:homepage) ? Page.homepage : Page.find_by_parent_id(nil) options = pointer_option_branch(root) options.unshift ['<none>', nil] options end def pointer_option_branch(page, depth=0) options = [] unless page.virtual? || page.sheet? || page.has_pointer? options << ["#{". " * depth}#{h(page.title)}", page.id] page.children.each do |child| options += pointer_option_branch(child, depth + 1) end end options end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-taggable-extension-1.2.5 | app/helpers/taggable_helper.rb |
radiant-taggable-extension-1.2.4 | app/helpers/taggable_helper.rb |