One feature that I'd love to see for this project is a drush command to create subthemes, kinda like what Omega and Layout Studio are already doing. That'd be sleek.


tsi’s picture

Status: Active » Postponed

Cool feature.
These is done by the Omega Tools module though, and not by the theme itself, on the other hand, it says "However, the functions this module provides could be used with any theme.".
Bottom line, ATM I really don't have any spare time for additional features, we still have work to do to get to a stable release here (e.g. this issue) but if anyone wants to implement that or at least see what is needed for this to work, they're welcome.
Setting this to postponed for now.

tsi’s picture

Status: Postponed » Closed (won't fix)

I won't be needing this so this won't be fixed unless someone wants to take this on.

ssherriff’s picture

I've created a rough drush command that can do this. I've based it on one I found for the Zen theme and adjusted it for 965.

Basically, the attached file should be included in the theme at the top level of the theme. That will make it so once someone downloads the theme, the command 'ninesixtyfive' will now show when you type 'drush help'. Oh, also, it needs to be renamed to ''.

How it is run, is:

drush ninesixtyfive --name="My Subtheme" --machine_name=mysubtheme

You can actually run it just like this:

drush ninesixtyfive

That will create a theme called 'My theme' and you'll have to rename everything again if you want to name it something else, so it is probably best to name it exactly what you want to start with.

ssherriff’s picture

Actually, here is a git patch file as well if you want to apply it to the code. I actually haven't created a patch in git before, so hopefully this worked.

tsi’s picture

Status: Closed (won't fix) » Needs work

Really cool, thanks !
In beta6 I have decided to lose the tar file and leave a SUBTHEME directory in the base theme, I guess this will require some changes to the drush file ?

tsi’s picture

Project: 965 » Sasson

The SASS branch of 965 has a new home and is now called Sasson.

tsi’s picture

-- double posted --

tsi’s picture

Status: Closed (fixed) » Fixed

Super cool, check this out (this will download Sasson, create a sub-theme and enable it) :

drush dl sasson
drush cc all
drush sns "My theme"

# [Edit] - the next lines aren't needed anymore, see update below
# drush en mytheme
# drush vset theme_default mytheme

You can have full control on the theme name and machine name with :

drush sns "Full Name" machine_name 

Thanks !

Update - you can now create, enable the newly created theme and set it as the default theme in a single line, simply :
drush sns "My theme" -y
The -y automatically answers "yes" when prompted to enable the newly created theme and set it as the default theme.

z.stolar’s picture

Status: Needs work » Fixed

This is absolutely great!

caiobianchi’s picture

I tried and it seems that the proper command is "drush sns my_theme". sns = sasson-new-subtheme
Nice to see it.
Thank you very much for your effort.

tsi’s picture

Yes, we have been working on the script in the last few days and that is one of the things got changed.
Thought "sns" (Sasson New Subtheme) is more descriptive.
I have updated my comment.

Status: Fixed » Closed (fixed)

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

ahimsauzi’s picture

Incredible work guys!! #18 is the way to go works like a charm!

amirtaiar’s picture

I keep getting:

The drush command 'sns Customer' could not be found

The drush command 'sns My theme' could not be found

tsi’s picture

@amirtaiar, try clearing your caches

amirtaiar’s picture

I did.
Try local, online... No success. Using MAC.

milkmiruku’s picture

a cache clear worked for me.

a minor issue, but it would be nice to if the command respected drush site context, so instead of;

$ pwd
$ drush dl sasson
Project sasson (7.x-2.2) downloaded to /var/aegir/platforms/d7-base-dev/sites/all/themes/sasson.   [success]
Project sasson contains 2 themes: SUBTHEME, sasson.
$ drush cc all
$ cd /var/aegir/platforms/d7-base-dev/sites/
$ drush sns test
test sub-theme was created in /var/aegir/platforms/d7-base-dev/sites/all/themes/test

it would be;
test sub-theme was created in /var/aegir/platforms/d7-base-dev/sites/

tsi’s picture

Good point, but this is a closed issue, please open a new one and we'll discuss it there.

Status: Fixed » Closed (fixed)

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