Down for the Count

Posted by Ben Childs Thu, 04 Sep 2008 02:15:00 GMT
It appears that something happened to my Typo blog on Monday or Tuesday. (Probably a rails upgrade from under my feet). So I took the opportunity to upgrade to Typo 5.1.3 which entailed all sorts of problems anyway. After much debugging I finally got things to work by modifying the typo code slightly. I initially had a "Missing Template" message whenever I was going to a page that wasn't on the admin site. I was finally able to resolve this by mucking with the Typo theming code: I modified app/controllers/application.rb, fixing setup_themer to point to the base theme directory as well as the views directory: ==
def setup_themer # Ick! self.view_paths = ::ActionController::Base.view_paths.dup.unshift("#{RAILS_ROOT}/themes/#{this_blog.theme}/views") self.view_paths = self.view_paths.dup.unshift("#{RAILS_ROOT}/themes/#{this_blog.theme}") end
== And then I chaged the layout method of the theme model (app/models/theme.rb) to just ask for 'default': ==
def layout "default" end
== Hope this helps someone else.. -Ben