Sha256: 47fac5cb0c988f87a1af721c19be651b73bac966b41e98b77fd4dc8fa3c69d88

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

module Owl
  module CMS
    module Helpers
      include Sinatra

      module Base

        def site_setting(key)
          Owl::CMS::App.settings.site_settings[key]
        end

        def theme_setting(key)
          Owl::CMS::App.settings.theme_settings[key]
        end

        def posts(include_unpublished=false)
          Owl::Lib::Page.all_posts(self, { include_unpublished: include_unpublished })
        end

        def data(key)
          Cabi.read [ Owl::Lib::Path::DATA_PATH, key].join(':')
        end

        def page_path
          @page.path
        end

        def page_type
          @page.type
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
owl-cms-0.1.5 core/helpers/base.rb