Creating an Omega subtheme with Drush - Quickest and easiest method

This page shows how to create a sub-theme using drush to quickly get started with a custom theme on top of the Omega base theme.

Drupal provides a theme inheritance capability that lets you create sub-themes which inherit all the properties of a base theme with the exception of those that you choose to override. Since Omega is a base theme there is no reason to hack or edit it directly.

Before you begin, you must have drush installed and configured. For more information, see Specific instructions for installing Drush on different platforms.

Omega, ships with two commands for generating a subtheme. One is a wizard, and the other creates the subtheme in one go. It is always suggested to use the wizard as it does not require you to remember the syntax for specifying the desired options. However, if you want to write a script that, among other things, generates the subtheme for you on the fly you might prefer the direct command.

Creating a subtheme with the wizard is as easy as drilling into your Drupal directory in terminal, and typing the following command and answering the questions asked by the wizard:

drush omega-wizard

Community Media Theme 1.x (based on Omega)

Disable debugging features and replace default logo

Next, we will disable the debugging features of Omega subthemes and replace the channelAustin logo with your logo:

  1. Click on Appearance in the Admin Toolbar
  2. Find the Community Media Theme and click Settings
  3. Click debugging in the list of vertical tabs
  4. Uncheck Enable the debugging (placeholder) blocks for the selected roles and Enable the grid overlay for the selected roles
  5. Now towards the bottom of the form, find the Logo image settings
  6. Either upload a logo or link to an existing logo. The logo will preferably be a transparent PNG, but a GIF or JPG will also work.
  7. Click Save configuration

Remove Secondary Menu from theme settings

The secondary menu (the User Menu that includes My Account & Log Out) should always be disabled from the theme settings. Instead, if you wish to use the User Menu, place the User Menu block in the region where you want that menu to appear. This is how to do it:

  1. Click on Appearance in the Admin Toolbar
  2. Find the Community Media Theme and click Settings

Omega 4.x

Should I use 3.x or 4.x?

Whether you should use Omega 4.x or Omega 3.x depends on several considerations:

Omega Theme Quickstart Guide (3.x)

Working with Omega

  1. Install and enable the Omega Core Theme
  2. Install and enable the Omega Tools module (admin/modules/). If you don’t already have it, you’ll also need the Ctools module installed and enabled. If you're a Drush user, you can skip the rest of these steps and quickly generate a subtheme of Omega using Drush.
  3. Go to admin/appearance, and click on "Create new Omega Subtheme" 
  4. Add your preferred subtheme name.
  5. Check the “Install automatically” option if you want to create your subtheme in/sites/all/themes/ automatically, Apache needs write permissions to perform this operation. If the option is not checked, Omega Tools will generate a mysubthemename.tar file that can be downloaded after completing the steps. To install, simply unzip and place your subtheme folder into sites/all/themes.
  6. Choose your subtheme save destination, the default folder is sites/all/themes.
  7. Choose your base theme.

Common Questions

This page is a list of commonly asked questions and their corresponding answers.

How do I add a new zone or region to my subtheme?

  1. Locate an existing zone/region in your subtheme's .info file (e.g) regions[header_first] = 'Header First' or zones[header] = 'Header'
  2. Copy & Paste it anywhere in your subtheme's .info file
  3. Rename the new line as appropriate for your scenario (e.g) regions[header_second] = 'Header Second' or zones[headerXYZ] = 'Header XYZ'
  4. Save your changes
  5. Clear cache
  6. Navigate to your subtheme's Zone & Region Configuration settings
  7. Locate your new zone or region in the "unassigned zones/regions" area at the bottom of the page
  8. Assign as desired

What does Weight & Position do?
* Weight = the position of the region in the markup
* Position = the visual positioning of a region

My content region isn't expanding, please help!
TURN OFF DEBUGGING BLOCKS also see http://drupal.org/node/1298690

How to override default hover color style from tables?
Apply the below code to your global.css:
tr:hover td, tr.even:hover td.active, tr.odd:hover td.active { background: #FFFEEE; }

How do I add a custom .js file to my Omega subtheme?

Pages

Subscribe with RSS Subscribe to RSS - omega