Wednesday, September 11, 2013

Integrating RefineryCMS 2.0 + Twitter-Bootstrap-Rails

This article is for integrating RefineryCMS 2.0 and Twitter-Bootstrap-Rails. Note that RefineryCMS in this tutorial is not the latest (which at the moment is 2.1.0).

At the end of the below steps, you should have a RefineryCMS app with a static Bootstrap layout.

After setting up your Rails app (basic steps here): , you need to override some of the views and so execute the following commands:
rake refinery:override view=refinery/_head
rake refinery:override view=refinery/_header
rake refinery:override view=refinery/_menu
rake refinery:override view=refinery/_content_page
rake refinery:override view=refinery/_site_bar
rake refinery:override view=refinery/pages/home
rake refinery:override view=refinery/pages/show

Then install the static template for twitter-bootstrap-rails
rails generate bootstrap:install static

Then replace the contents of each of the files listed in app/views/refinery/ with the following:
https://github.com/keithxm23/Portfolio/tree/boilerstart/app/views/refinery
From the link above, copy paste contents of all files in app/views/refinery including those in the /pages directory to the respective files in your project.

Also copy paste the contents of bootstrap_overrides to fix some of the css issues. This css-fix is a bit hacky and you can try to do a better job of it if you wish.
https://github.com/keithxm23/Portfolio/blob/boilerstart/app/assets/stylesheets/bootstrap_and_overrides.css

You should be golden. 

1 comment:

  1. bootstrap modal (the frame) is an extended backbone view (its thin layer is defined inside the lib), the backbone modal .... Subscribe to: Post Comments (Atom)bootstrap

    ReplyDelete

Popular Posts