Hi,

I am working with Commons 3.x - it has wonderful Commons Origins theme, which is AT sub-theme. The documentation about it is pretty non-existent and it seems there are much more to do that to simple follow sub-theming documentation on Drupal or use Footheme? Waht to do with those extra goodies in folders: sass and others?

The question is: what is the proper step by step way to create sub-theme?

Comments

ptkoroma’s picture

Priority: Normal » Major

I am facing the same problems too. Trying to create a sub-theme from the Commons Origins theme but can't get the color palettes to show up in my themes

wusel’s picture

[created October 10, 2013 at 2:07pm, updated October 30, 2013]

Please check that the core modele "color" is enabled! You need it to change the color.

Now copy AdaptiveTheme from https://drupal.org/project/adaptivetheme and AT Commerce from http://drupal.org/project/at-commerce to your themes-path like sites/all/themes/
Always match version for version - this means the subtheme and Adaptivetheme core need to be the same themes-version!

If you have installed "Drupal Commons 7.x", the needed themes are installed.

Then look at http://adaptivethemes.com/documentation/drush :
drush adaptivetheme "Your Theme Name" yourthemename

Then you find your new theme at "profiles/commons/themes/contrib/yourthemename".

In the .info file of your own theme you have to find a line like
base theme = " "
where you change " " to the name (if necessary with "_", no " ", no "-") of your base theme, e.g. "commons_origins"

Then look at http://adaptivethemes.com/documentation/footheme for "3.":

Color module stuff - using Corolla? No issue, do nothing. If you're using Pixture Reloaded or Sky then you need to delete the color folder from this theme and copy/paste in the color folder from your chosen base theme.

Pixture Reloaded uses images as part of the color process - they are all in the /images folder in Pixture Reloaded - you should copy and paste that folder in as well.

Copy the directory images from your base theme ("profiles/commons/themes/commons/commons_origins/") to your own theme!

Then copy the directory templates and the file template.php from your base theme ("profiles/commons/themes/commons/commons_origins/") to your own theme!
Then open the file template.php of your theme within a good editor and change "commons_origins" to "yourthemename" everywhere in this file.

Then goto "admin/appearance" and click at "Enable and set default" of your theme. Now goto "admin/appearance/settings/mythemename" and save your theme settings.

Now clear all caches.


I never used your base theme, so I cannot help you more.

Good luck!

Wusel

stewart.adam’s picture

This likely belong in the Commons issue queue - AT has no relation to Drupal Commons apart from the fact that it's the base theme for commons_origins. See #2075847: How to create a... Commons Origins sub-theme?.

wusel’s picture

Project: AdaptiveTheme » Commons (Installation profile and Drush make scripts)
Version: 7.x-3.x-dev »
Priority: Major » Normal
Issue summary: View changes

Moved to Commons, this is no AT issue

charlie charles’s picture

Hi
How do you add a subtheme instead of

/profiles/commons/themes/

to

/sites/all/themes/

because when I move the theme
to /sites/all/themes/ I get error messages i.e

Notice: Undefined variable: inner_prefix in include()

Many Thanks for your help

alantra’s picture

On the issue of the color palettes (comment #1), it looks like they are only meant to work with the Commons Origins theme.

The function commons_origins_palettes_form() only seems to be called from two places - the Drupal Commons installer and the "Commons Misc" module; in the latter the logic allows the palette to be displayed only on the Settings page for the theme named commons_origins.

windmaomao’s picture

Will this be easier, just drag this commons origins folder to sites/all/themes, just to make sure the system still register the correct path, disable the module before moving.

I know this won't create a subtheme for this, but I just don't think another subtheme will do me any good. Because anyway you have to copy template folders over so no future updates will be done for you anyway.

just my two cents. The only downside is that you have to stick with origin commons theme name, which i really don't mind.

authentictech’s picture

If you are prepared to register a free account at Acquia.com you can read how to create a subtheme of Commons Origins here https://docs.acquia.com/commons/develop/subtheme

The basic gist of it is that you create the subtheme in the normal Drupal way inside the sites/all/themes folder.

There is no need to copy the commons origins theme folder to sites/all/themes. You will only need to copy the template folder/files to your subtheme folder if you want to override or modify the templates.

kopanda’s picture

I have followed the steps and created the subtheme. However, all the styles from common_origins lost. Does this happen normally? We only use the templates but we have to create our styles all again?

Thanks!

dav3evans’s picture

@Kopanda did you manage to work out what to do with the sub theme creation? I'm in exactly the same situation, where I would like to keep the origins styles after creating a sub theme, but just copying all the style sheets breaks everything.

If anyone else can weigh in here, that'd be ace.

leymannx’s picture

If it's only for CSS you should maybe add a very small custom module to add your own CSS in the end. I'm saying that after trying for 2 hours to get a Commons Origins sub theme running smoothly without breaking any settings or layouts. Now I'll simply add my own CSS from a custom module. End of story.