Search code examples
ruby-on-railscontent-management-systemruby-on-rails-plugins

How to customize layouts in Goldberg CMS?


I maintain legacy website running on Ruby on Rails and Goldberg CMS. Some things that are really trivial to do in Rails are difficult to implement in Goldberg. For instance: I want some content pages created by Goldberg CMS to use non-standard layout (currently, every Goldberg page uses default application.html.erb layout) - how can I do that? As far as I can tell, I can't configure it in CMS UI.


Solution

  • If you take a quick look at how the layout is defined in the application's code : lib/goldberg/controller.rb

    You'll see the following line :

    base.layout "application"
    

    The layout is hard coded in the application. So if you want to define an other layout for it, I'm afraid you will have to patch Goldberg.