Hi, I'm using the instructions at http://drupal.org/node/108459 to integrate my Hexagon subtheme with the color module. It successfully creates the [mysubtheme]-color.css file in sites/default/files/color/[subtheme-string], and adds it to $vars, i.e. I can see the correct path when I print $vars['css']['all']['theme'] or $vars['styles']. However, the old path (sites/all/themes/[subtheme]/colors/original-color.css) is still being used in the document head. I've also tried moving the

if (module_exists('color')) {
  _color_page_alter($vars);
}

snippet from the preprocess_page function to re_process (and cleared the cache). Could this be caused by the smarter-styles plugin? Any help would be greatly appreciated. Thanks!

Comments

dvessel’s picture

Thanks, I'll look into this. Smarter styles is most definitely the culprit.

dvessel’s picture

Status: Active » Needs review

This patch has two pieces to make it work with the color.module. First is a color.module compatibility plugin to make it work with smarter styles. The other is a 3 line code patch for smarter styles itself to give it a tiny bit more flexibility allowing the compatibility plugin. Yeah, it seems weird but it works without having to rip apart smarter styles more than I want to.

About the instructions for placing this bit of code in your preprocessor…

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function phptemplate_preprocess_page(&$vars) {
  // Hook into color.module
  if (module_exists('color')) {
    _color_page_alter($vars);
  }
}

Don't do it. The above block is not needed. The color.module compatibility will enable itself when needed and the code will execute automatically.

dvessel’s picture

Can't get the patch to upload. Here it is from my dropbox.

http://dl.dropbox.com/u/2316286/drupal/hexagon-994920.patch

penguininja’s picture

Awesome, thanks! The patch worked perfectly for me.

dvessel’s picture

Category: support » task
Status: Needs review » Fixed

committed. thanks.

Time to roll another update.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.