Sha256: d815f6895097fab0981015f02ccf960ca43edda9e2a263bb97c715635eb85fd7

Contents?: true

Size: 784 Bytes

Versions: 9

Compression:

Stored size: 784 Bytes

Contents

module ThemeHelper

  # NB: This overrides an undocumented rails function in order to add
  # a search path. We need this to get themes working, but I'd be
  # happier if we didn't have to override undocumented methods. Ho
  # hum. -- pdcawley

#   def search_paths
#     ["../themes/#{this_blog.theme}/views",     # for components
#      "../../themes/#{this_blog.theme}/views",  # for normal views
#      ".",
#      "../app/views"]
#   end

#   def full_template_path(template_path, extension)
#     search_paths.each do |path|
#       themed_path = File.join(view_paths.first, path, "#{template_path}.#{extension}")
#       return themed_path if File.exist?(themed_path)
#     end
#     # Can't find a themed version, so fall back to the default behaviour
#     super
#   end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typo-5.0.1 app/helpers/theme_helper.rb
typo-5.0.2 app/helpers/theme_helper.rb
typo-5.0.3.98.1 app/helpers/theme_helper.rb
typo-5.0.3.98 app/helpers/theme_helper.rb
typo-5.0 app/helpers/theme_helper.rb
typo-5.1.1 app/helpers/theme_helper.rb
typo-5.1.2 app/helpers/theme_helper.rb
typo-5.1.3 app/helpers/theme_helper.rb
typo-5.1 app/helpers/theme_helper.rb