Sha256: 4731faca0567776be5e4b685a360ac795511e2ac21d124b94ac296244a9009bc

Contents?: true

Size: 726 Bytes

Versions: 56

Compression:

Stored size: 726 Bytes

Contents

module Caboose
  module PagesHelper
    def pages_list(page)
      str = "<ul>"
      str << pages_list_helper(page)      
      str << "</ul>"
      return str
    end
    
    def pages_list_helper(page)
      str = "<li><a href='/admin/pages/#{page.id}/edit'>#{page.title}</a>"
      if page.children && page.children.count > 0
        str << "<ul>"
        page.children.each do |p|
          str << pages_list_helper(p)
        end
        str << "</ul>"
      end
      str << "</li>"
      return str
    end

    def ab_testing_analytics_code
      return "var _gaq = _gaq || [];\n_gaq.push(['_setCustomVar', 1, 'caboose_ab_variants', #{Caboose.json(AbTesting.analytics_string)}]);"            
    end
    
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
caboose-cms-0.3.78 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.77 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.76 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.75 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.74 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.73 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.72 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.71 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.70 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.69 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.68 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.67 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.66 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.65 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.64 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.63 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.62 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.61 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.60 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.59 app/helpers/caboose/pages_helper.rb