app/helpers/roroacms/view_helper.rb in roroacms-0.0.2 vs app/helpers/roroacms/view_helper.rb in roroacms-0.0.3
- old
+ new
@@ -135,11 +135,11 @@
# returns a boolean as to wether the template file actually exists
# Params:
# +name+:: the name of the template file that you want to check exists
def view_file_exists?(name)
- File.exists?("#{Rails.root}/app/views/theme/#{current_theme}/template-#{name}." + get_theme_ext )
+ File.exists?("#{Rails.root}/app/views/themes/#{current_theme}/template-#{name}." + get_theme_ext )
end
# get current theme
@@ -152,22 +152,22 @@
# example usage would be: <%= render theme_url 'sidebar' %>
# Params:
# +append+:: the name of the file that you want to render
def theme_url(append)
- "theme/#{current_theme}/#{append}"
+ "themes/#{current_theme}/#{append}"
end
# displays the header. + get_theme_ext template in the theme if the file exists
def display_header
- render :template => "/theme/#{current_theme}/header." + get_theme_ext if File.exists?("#{Rails.root}/app/views/theme/#{current_theme}/header." + get_theme_ext )
+ render :template => "/themes/#{current_theme}/header." + get_theme_ext if File.exists?("#{Rails.root}/app/views/themes/#{current_theme}/header." + get_theme_ext )
end
# displays the header. + get_theme_ext template in the theme if the file exists
def display_footer
- render :template => "theme/#{current_theme}/footer." + get_theme_ext if File.exists?("#{Rails.root}/app/views/theme/#{current_theme}/footer." + get_theme_ext )
+ render :template => "themes/#{current_theme}/footer." + get_theme_ext if File.exists?("#{Rails.root}/app/views/themes/#{current_theme}/footer." + get_theme_ext )
end
end
end
\ No newline at end of file