Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
ptkoroma CreditAttribution: ptkoroma commentedI 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
Comment #2
wusel CreditAttribution: wusel commented[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 likesites/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.":
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 filetemplate.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
Comment #3
stewart.adam CreditAttribution: stewart.adam commentedThis 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?.
Comment #4
wusel CreditAttribution: wusel commentedMoved to Commons, this is no AT issue
Comment #5
charlie charles CreditAttribution: charlie charles commentedHi
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
Comment #6
alantra CreditAttribution: alantra commentedOn 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.
Comment #7
windmaomao CreditAttribution: windmaomao commentedWill 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.
Comment #8
authentictech CreditAttribution: authentictech as a volunteer commentedIf 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.
Comment #9
kopanda CreditAttribution: kopanda commentedI 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!
Comment #10
dav3evans CreditAttribution: dav3evans commented@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.
Comment #11
leymannxIf 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.