2

I'm trying to create a functioning sub theme of Omega 4.4. I've worked with Drush before with it, but the site is on a host that I'm not administrator of. I've tried the Drush Webservice module but not succeeded in executing the Omega Wizard. In short, the Omega Wizard may be extremely helpful, but I can't get it to work.

Next, I've tried to manually create a sub theme using the instructions here. However, the results of this is a theme catalogue in the Themes-folder, but the theme not showing up in Drupal. Perhaps I'm using the wrong instructions for the wrong version of Omega?

Anyhow, does anyone have instructions for how to install an Omega 4.4 sub theme manually for Drupal 7?

1 Answer 1

1

This documents manually copying the default starterkit subtheme in Omega 4.4. The instructions are similar for both "dusty" and "default" starter kits. Note that the "default" theme has libsass, and has less files then "dusty."

  • Dusty: the original omega front-end set up, which is becoming increasingly outdated.
  • Default: a more contemporary subtheme, front-end development wise. This is the better option.

Note: since I use a simple, one-word theme name in this example I can replace THEME-placeholders with one value. If you wish to have a more complex subtheme name, consider this array from the drush omega subtheme function:

'/{{ THEME }}/' => $machine_name,
'/{{ THEME NAME }}/' => $name,
'/{{ THEME SANITIZED }}/' => str_replace('_', '-', $machine_name),
'/{{ THEME CAMELCASE }}/' => $camel,
'/{{ THEME CAMELCASE LOWER }}/' => lcfirst($camel),

Prerequisite: Your theme's name. I'm using "mytheme" Substitute mytheme with your theme name.

  1. Copy themes/omega/omega/starterkits/default (or dusty) to themes/mytheme
  2. Copy default.starterkit.inc to mytheme/mytheme.info
  3. Changes to mytheme.info
    • Change the name value to 'mytheme'
    • Insert base theme = omega to line 3
    • Change the theme file names from {{ THEME SANITIZED }} to mytheme
      For example - from:
      stylesheets[all][] = css/{{ THEME SANITIZED }}.reset.css
      To:
      stylesheets[all][] = css/mytheme.reset.css
    • Change the scripts name to css/mytheme.behaviors.js
    • Add regions info:
      ; ========================================
      ; Regions
      ; ========================================
      regions[branding] = Branding
      regions[header] = Header
      regions[navigation] = Navigation
      regions[highlighted] = Highlighted
      regions[help] = Help
      regions[content] = Content
      regions[sidebar_first] = First Sidebar
      regions[sidebar_second] = Second Sidebar
      regions[footer] = Footer
  4. Update theme name in files:
    • package.json: {{ THEME }} to mytheme
    • template.php: {{ theme name }} to mytheme
    • theme-settings.php: {{ THEME }} and {{ theme name }} to mytheme
    • preprocess/page.preprocess.inc: {{ THEME }} to mytheme
    • process/page.process.inc: {{ THEME }} to mytheme
    • sass/README.md {{ THEME SANITIZED }} to mytheme
    • The following renames are in dusty only:
      • .ruby-gemset
      • bower.json
      • libraries.make
  5. Rename files as necessary:
    • Rename css files to css/mytheme.reset.css (default subtheme only) and css/mytheme.styles.css
    • Rename scss files to sass/mytheme.reset.scss (default subtheme only) and sass/mytheme.styles.scss
    • The following file-renames are in dusty only:
      • Rename css files to css/mytheme.hacks.css, css/mytheme.no-query.css and css/mytheme.normalize.css
      • Rename scss files to sass/mytheme.hacks.css, sass/mytheme.no-query.scss and sass/mytheme.normalize.scss

And there it is:screenshot of the newly activated theme

I've created a github of that shows the comparitive starterkit to wizard-created subthemes. Using this link, you can see all the necessary modifications you'll need to make, for dusty here or for default, here

I've updated this document out of pure curiosity. If I were in your situation, however, I would simply run the omega-wizard on my local dev environment, and push the theme to my server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.