How to create a sub-theme of Acquia Marina?

Events happening in the community are now at Drupal community events on www.drupal.org.
trgreen17's picture

Hi, I'm fairly new to Drupal but learning quickly. I am running a multi-site Drupal install on a VPS that will only house Drupal sites. I am using subdomains for the multi-site functionality, which is working fine, symbolic links and all.

I am using Acquia Marina for all of my sites, along with, of course, Fusion and the Skinr Module. They are all placed in the "Sites/All/Themes" folder. Here's my question: I want to be able to change my theme slightly for each site. I know about the "local.css" file and I am using it, however it is global, but I want to have a slightly different version of AM for each site - sometimes only changing colors and widths, but other times making more drastic changes. I obviously do not want to change the code in AM - what I want is a sub-theme, in case there is an update to AM or Fusion. So, how do I do that? I followed the sub-theming instructions for Fusion Core with my install of AM, and it didn't quite work.

Then I found this at the bottom of the Fusion sub-theming page (http://drupal.org/node/629454)

"A note about sub-sub-theming

Right now we can't recommend trying to sub-theme a Fusion sub-theme (e.g., Acquia Prosper) in Drupal 6 until a patch to fix the "Theme settings forms are not inherited by sub-themes" issue (http://drupal.org/node/481142) is committed to core. Once that patch is committed, unlimited levels of theme inheritance should be possible.

While it might be possible to sub-theme a Fusion sub-theme right now, at a minimum it requires replicating the theme-settings.php file from Fusion Core, and probably more. The Drupal 7 version of Fusion should have no trouble being sub-themed to any level."

Assuming that AM is a sub-theme of Fusion, this means I cannot make a sub-theme of AM, right?

So, how do I accomplish this? What I want is several sites that use AM, but I want to be able to have slightly different versions of AM for each site, without hacking the code. Is this possible?

I also tried moving Fusion and AM into my site-specific folder, assuming I could have copies of AM in each site's "themes" folder and just go ahead and hack the code. That woul be a little confusing because they would all be named the same, but at least I would be able to have slightly different versions. That did not work however. When I moved Fusion and AM out of the "All/Sites/Themes" folder and into one of my sites "Themes" folder, my site broke compeletely and rendered a blank page. :-(

How can I accomplish this?

Any help very much appreciated.

Tim

Comments

With the D6 sub-theme issue

sgprs's picture

With the D6 sub-theme issue mentioned, I think the easiest way to accomplish this is to duplicate (not move) your Fusion Core and Marina themes. I've done this before and it works with no issue. Using ftp, I downloaded them, then uploaded back into the site specific folder (to make it easier). Remember to create a "themes" folder for each site. Change the names to represent each site and update the .info to reflect the changes. Remember to pay close attention to the css settings in .info and make sure the reflect what you need (comment, un-comment or delete as needed). You could also do this but place the new one's in the "All" themes folder if you're not altering Core, then in each site, tell it what theme to use.

The jest of it is that basically you're creating new Fusion sub-themes based on Marina, but naming it something else. If all name changes are done correctly, Drupal will see these as totally new themes... from there you can hack away specific for each site. Some people may not like this method, but in all reality, there's nothing wrong with it. If you create a custom theme, say from Zen or Fusion, then you're doing the same thing. In your case, you're just starting from what you already have with Marina and altering from there... cutting down on the work required.

One of the TNT guys may have a better solution, but I've done this MANY times with Prosper (which I LOVE!) and it works perfectly. Give it a shot. Remember to clear theme registry and that good stuff.

Keep us up to date... and post back if you need more help.

Good luck!
Chris

Updateable?

shinz83's picture

How does sub-theming affect my ability to update when Marina comes out with a new version?

What files do I need to create or edit in order to keep the core intact? Is this possible?

Thank you very much for the

trgreen17's picture

Thank you very much for the detailed response! I'll try it soon (hopefully today) and let you know what happens...

Thanks!

trgreen17's picture

It works perfectly, however, I didn't copy the "Fusion Core" theme. Will that be a problem? Or did I need to copy it only if I wanted to change something in Fusion Core?

Thanks again.

Awesome!

sgprs's picture

I'm glad you got it working. Once you know how to do this, you end up doing it quite often (or at least I do). I'm using Themekey and doing something similar: Using Prosper to have slightly different layouts for different content types. It works beautifully.

And no, you don't need to copy Fusion unless you made or are gonna make changes to it. Marina will still pull from core, so you'll be good to go there.

If you need anything else, don't hesitate to ask. You can also contact me directly here at Drupal.

Best of luck!
Chris

Step by step tutorial

parasox's picture

I wrote a tutorial that may help some people with creating a marina or prosper sub theme, and getting a new site up using the configuration of an existing site.

http://drupal.org/node/1135618

TNT Themes

Group organizers

Group categories

Type of post

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week