Open Atrium is shipped with Open Atrium Radix, a sub-theme of the Radix theme for Panopoly. Check the project page of Radix for further background information on this Bootstrap based theme.

Find general information about Drupal subtheming. Read about Radix subtheming; this page also shows you how to create a sub-theme manually, in case the Drush method doesn't work for you.

Please note that creating subthemes is never going to be a completely black-box "click one button" process. It is still expected that it's done by somebody familiar with writing Drupal themes, etc. The drush command is just a starting point to save a bunch of work.

Below is a summary of steps to generate a valid sub-theme of oa_radix

  1. Run drush oa_radix mysubtheme. If you get the error: The drush command 'oa_radix mysubtheme' could not be found, don't forget to run drush dl oa_radix and drush cc drush to ensure you are subtheming from an install in /sites/all/themes/
  2. Run compass watch in site/all/themes/mysubtheme/
  3. cp profiles/openatrium/themes/oa_radix/colorizer.inc sites/all/themes/mysubtheme/ (Optional, if colorizer is needed)
  4. cp profiles/openatrium/themes/oa_radix/assets/stylesheets/colorizer.css sites/all/themes/mysubtheme/assets/stylesheets/(Optional, if colorizer is needed)
  5. cp profiles/openatrium/themes/oa_radix/templates/colorizer.htm sites/all/themes/mysubtheme/templates(Optional, if colorizer is needed)
  6. goto admin/appearance, enable mysubtheme
  7. goto admin/config/development/bootstrap_library, Themes Visibility -> Activate on specific themes -> Only the listed themes, add mysubtheme
  8. goto admin/appearance, set default mysubtheme
  9. DONE.

Please note that after these steps have done, the created subtheme only has one region (content region). If you need more regions so that you can add/arranges blocks, you have to add regions in .info file. Without adding more regions, the subtheme may look like NOT working or some errors.

Subtheme troubleshooting

I cannot edit panels content using the editor. I just see a cog that spins forever.
You have not enabled bootstrap for your sub-theme. Follow the step above to activate it on your subtheme.

Comments

ozhovnir’s picture

Hi,

Thanks for posting these. I'm having issues running compass watch or compass compile. I get the following error:

Gem::ConflictError on line ["2104"] of /Library/Ruby/Site/2.0.0/rubygems/specification.rb: Unable to activate compass_radix-3.1.3, because compass-1.0.1 conflicts with compass (~> 0.12)
Run with --trace to see the full backtrace

May be a general compass issue. Any help would be much appreciated.

Thanks,

OZ

ozhovnir’s picture

Update: I was able to resolve my compass issues by installing bundler. Here are the steps I took:

$ sudo gem install bundler
$ bundle install
$ bundle exec compass watch or bundle exec compass compile

OZ

gebeer’s picture

Hello,
I'm trying to create a sub-theme with drush on a VDD VM following the steps outlined here.

I get this error on drush oa_radix mysubtheme

The drush command 'oa_radix mysubtheme' could not be found

What am I missing here?

candelas’s picture

I had that problem and I solved by
drush cc drush

When I was having problems, I read that it is also important the drush version. I have 6.2.0 and it works (they said that 5.x and 7.x were not working).

//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong

Amstercad’s picture

I also get stuck with the same error message as gebeer.

The steps above would clearly be the easiest method to create a new subtheme, but require drush to be installed and working 100%. Here are alternative steps that do not require drush, (see Option B).

Argus’s picture

That page is already linked in the article above. Added an explanatory sentence about it.

candelas’s picture

The Gem file that is created on the sub-theme comes with

source 'https://rubygems.org'
ruby "2.0.0"
gem 'sass', '~>3.2.14'
gem 'compass', '~>0.13.alpha.4'
gem 'chunky_png', '>=1.2.9'
gem 'rb-fsevent', '~>0.9'
gem 'bootstrap-sass', '>= 3.0.3.0'
gem 'compass_radix', '>= 3.0.1'
gem 'sass-globbing', '>=1.1.0'

that need to be installed. I recommend the rvm program that lets you have different ruby versions

To see the versions that you have
rvm list

If version 2.0.0 is not installed
rvm install ruby-2.0.0-p598

Set the default version to 2.0.0
rvm --default use ruby-2.0.0

To see gem list
gem list

To install a gem version

gem install sass -v 3.2.14
gem install compass -v 0.13.alpha.4
gem install chunky_png -v 1.2.9
gem install rb-fsevent -v 0.9
gem install bootstrap-sass -v 3.0.3.0
gem install compass_radix -v 3.0.1
gem install sass-globbing -v 1.1.0
gem install font-awesome-sass

I had to install also
gem install rb-inotify -v 0.9

because when I run
compass watch

it gave to me this error

Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please add the following to your Gemfile to satisfy the dependency:
    gem 'rb-inotify', '~> 0.9'
  
  For a better performance, it's recommended that you satisfy the missing dependency.
  Compass is polling for changes

Also I had to add a line in the sub-theme Gem
gem 'rb-inotify', '~> 0.9'

I wanted to have Sass Globbing Plugin (it allows you to import many sass or scss files in a single import statement). So in the sub-theme config.rb, I had to add
require 'sass-globbing';

To make a gemset for your sub-theme to not have problems with versions
rvm gemset create sub-theme-name

//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong

Argus’s picture

@candelas: Perhaps you better open a separate issue for your problem. Let's keep these comments about the documentation. Once you solved it you are welcome to edit the doc page!

candelas’s picture

Sorry. I was trying to document how I solved it:)

Also, I just found that for the oa_toolbar to work with a subtheme you have to rename assets/javascript/script.js to a different name (sub-script.js in my case) because it was overriding the script.js from the oa_radix theme. I also change in the subtheme.info file the name

; Javascript
scripts[] = assets/javascripts/sub-script.js

And now it works perfect. Thanks

//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong

brandy.brown’s picture

I was having a problem that my panels ipe links were not showing up in my subtheme, renaming the js file as you've said also solved this problem. Thank you!

joep.hendrix’s picture

Very much needed in order to make the page manager work.
Maybe this should be added to documentation above?

-----------------------------------------
Joep
CompuBase, Dutch Drupal full service agency

SERVANT14’s picture

Should the second command be compass create rather than compass watch?

mike_529’s picture

If you are making a sub-theme of oa_radix, note that the assets/sass/global/_variables.scss is using variable names from Bootstrap 2.x, not the new variable names used by Bootstrap 3.x. Changing the values in your sub-theme's _variables.scss file won't get applied because you're compiling against Bootstrap 3.x, which uses slightly different variable names. (bug filed against the oa_radix project).

candelas’s picture

@mike_529 do you have the variables list that need to be changed? It is the first time that I use Bootstrap and others can also use it :)

//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong

TristanTheKnightAway’s picture

Turns out 2 years on the issue queue is not enough to fix this problem: OA Radix Project Issue queue: https://www.drupal.org/project/issues/oa_radix?categories=All

Special thanks to @candelas for creating the patch (still stuck in approval). I opened the patch in a browser/editor and just manually replaced the variables to my _variables.scss file and now I may destroy Helvetica Neue. Link to the patch file: https://www.drupal.org/files/issues/oa_radix-update-_variable.scss-to-bo...

brandy.brown’s picture

The first step on this page should be drush dl oa_radix.

I didn't realize that you have to install the oa_radix theme into sites/all/themes before you can subtheme. This may seem obvious to some people, but I was assuming it could use the oa_radix theme housed under profiles.

If you don't do this first step, you will consistently get drush command oa_radix not found even after drush cc drush.

jordan8037310’s picture

SocialNicheGuru’s picture

I was trying to create a subtheme from within openatrium
oa_radix or radix has to be in sites/all/themes not profiles/openatrium/themes for the above to work

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.

tmbridge’s picture

Yep, this is why in step #1 it reads:

If you get the error: The drush command 'oa_radix mysubtheme' could not be found, don't forget to run drush dl oa_radix and drush cc drush to ensure you are subtheming from an install in /sites/all/themes/