Ayaz
Ayaz

Reputation: 376

omega 4.x sub theme creation

I have spent lots of time to search good tutorial or documentation for creation omega 4.x sub theme, But did't found. Like How to create a layout templates using with node types, taxonomy, user pages. Any help appreciable

Upvotes: 1

Views: 4296

Answers (2)

Matutinal
Matutinal

Reputation: 21

leveluptuts are making great tuts right now for omega 4.x

leveluptuts.com

here is the playlist at Youtube : http://www.youtube.com/playlist?list=PLLnpHn493BHH5nnK2dKE_42l1oXA6Tq6H with something like a new video per week !

Upvotes: 2

C13L0
C13L0

Reputation: 611

If you are a windows user, you will first need to set up a virtual box with linux. While linux is the preferred choice to theme with Omega 4, you can also use mac but will need homebrew, etc.

Windows user:

  1. Virtualbox https://www.virtualbox.org/wiki/Downloads
  2. Drupalpro https://drupal.org/project/drupalpro

Drupalpro is a prebuilt linux environment for drupal. Follow the directions for install then complete the drupalpro update that is documented in the middle of the page. Make sure and update drush as per the update directions as Omega 4 needs more recent version. Last, update ubuntu with sudo apt-get update (don't use the package manager)

The directions below have been tested with Drupalpro (source for rvm install)

Install https://rvm.io/ Always check for the most recent/stable version!

$ \curl -L https://get.rvm.io | bash -s stable
$ source /home/drupalpro/.rvm/scripts/rvm
$ rvm requirements

Next build and install the latest version of Ruby (this might take awhile). As of Aug 2013, this is the latest build. Please change as needed.

$ rvm install 1.9.3
$ rvm use 1.9.3
$ rvm rubygems latest

Verify rvm install:

$ rvm -h
$ rvm list
$ ruby -v

You should get a message similar to: ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]

Now you are set up and ready to install an Omega4 subtheme. Cd to the root of your drupal site.

drush dl omega --select

Choose the appropriate Omega4 version. This will automatically download and place Omega 4.x in sites/all/themes/omega. Omega4 comes with it's own drush commands which is why it is important to have a recent version of drush. Clear drush cache then view the new omega drush commands.

drush cc drush
drush help --filter=omega

Create your subtheme

drush omega-wizard

Follow the set-up directions.

Please enter the name of the new sub-theme [Omega Subtheme]: Yoursubthemename

Please enter a machine-readable name for your new theme [yoursubthememachinename]

Please choose a base theme for your new theme

2 : Omega - A powerful HTML5 base theme framework utilizing tools like
Sass, Compass, Grunt, Bower, Ruby Version Manager, Bundler and more.

Please choose a starterkit for your new theme

1 : Default: Comes with a well organized Sass setup with heavy use of partials. (Provided by Omega)

Please choose a destination. This is where your sub-theme will be placed Please choose a destination type.

1 : Site (e.g. 'all' or 'example.com')

Please choose a site.

1 : all

Do you want to keep the starterkit's readme files? (y/n):

Do you want to enable your new theme? (y/n):

Do you want to make your new theme the default theme? (y/n):

If everything went as it should you will see the following message: You have successfully created the theme Yourthemename (yourthememachinename) in sites/all/themes. [success]

After finished, inside your subtheme run:

bundle install

trouble shooting If you receive an error at bundle install or at bundle exec guard, you may need to change your terminal preferences. terminal > profile preferences > title and command > check-mark "run command as login shell" image. Close terminal, cd back to the root of your site and run bundle install.

cd into root of sub-theme:

bundle exec guard

You have now created your Omega Subtheme. Documentation for creating custom layouts here

Upvotes: 6

Related Questions