I new to Drupal, so maybe my fault, but I have a problem. I tried to create a subteme. I wanted to change some css settings. I created a subdirectory into the mayo directory, then I put there 3 files:
galeria.css
galeria.info:

name = mayo-galeria
description = Just a little change
core = 7.x
version = 0.1
engine = phptemplate
stylesheets[all][] = galeria.css
base theme = mayo
...and I copied all regions entries from the Mayo info file.

template.php:

<?php
// $Id: template.php

When I activate this subtheme, my modifications appear, but the color sheme switcher doesn't appear on the theme settings page.

Comments

morthylla’s picture

Hi Pischta

I'm trying to do the same, just modify some css styles, so I also created a subtheme.

If your main concern are the colors defined using the Color interface and not the interface itself, it seems the Color module saves the configured color scheme as a .css file inside the files directory (in my server the file is sites/default/files/color/mayo-9810bdde/colors.css). So by copying that file as your theme css or including it inside, it is possible to get the same colors for your subtheme.

Cheers

pischta’s picture

Hi Morthylla,

and thanks your reply. Your advice is a workaround. If I won't find a way to use Mayo's color schema chooser, finally I use this method. Hope I find the method how I can use color schema chooser in my subtheme.

ontological’s picture

I really like the Mayo theme. It is one of the easiest to configure.

In relation to the color picker in the theme settings page, there is a 'color' directory within the Mayo folder and that is used to show the color options. You should copy that over along with the stylesheet and regions settings from the mayo.info file.

It would be nice to have a little guide on creating a Mayo sub theme please.

I experimented with creating a sub theme. Here is the minimum:

-copy mayo directory to new directory on same level as mayo.
-rename folder to the new theme name -- example - newtheme.
-delete everything out of the css, images, js, and templates directories.
-delete the template.php and the theme-settings.php files from the newtheme directory.
-rename mayo.info to newtheme.info
-edit the newtheme.info file so that it looks like this:

; $Id:
name = sitesbase
description = Sub theme based on mayo theme
base theme = mayo
core = 7.x

stylesheets[all][] = css/layout.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/colors.css

regions[header] = Header
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom

regions[menubar] = Menu bar
regions[submenubar] = Submenu bar

regions[banner_top] = Banner top

regions[top_column_first] = Top first column
regions[top_column_second] = Top second column
regions[top_column_third] = Top third column
regions[top_column_fourth] = Top fourth column

regions[highlighted] = Highlighted
regions[content] = Content
regions[sidebar_first] = Sidebar first
regions[sidebar_second] = Sidebar second

regions[bottom_column_first] = Bottom first column
regions[bottom_column_second] = Bottom second column
regions[bottom_column_third] = Bottom third column
regions[bottom_column_fourth] = Bottom fourth column

regions[banner_bottom] = Banner bottom

regions[footer_column_first] = Footer first column
regions[footer_column_second] = Footer second column
regions[footer_column_third] = Footer third column
regions[footer_column_fourth] = Footer fourth column
regions[footer] = Footer

settings[shortcut_module_link] = 0

settings[base_font_size] = 87.5%
settings[base_font_family] = 0
settings[heading_font_family] = 0

settings[base_vmargin] = 14px
settings[page_width] = 90%
settings[page_margin] = 10px
settings[layout_style] = 1
settings[round_corners] = 0

settings[header_searchbox] = 1
settings[header_fontsizer] = 0
settings[header_height] = 90px
settings[header_border_width] = 1px
settings[logo_top_margin] = 15px
settings[logo_left_margin] = 20px
settings[sitename_top_margin] = 15px
settings[sitename_left_margin] = 20px
settings[searchbox_top_margin] = 20px
settings[searchbox_right_margin] = 15px
settings[header_bg_file] = ''
settings[header_bg_alignment] = 'top left'
settings[header_watermark] = 0

settings[menubar_style] = 1

settings[sidebar_layout_style] = 1
settings[sidebar_first_width] = 25%
settings[sidebar_second_width] = 25%

settings[display_breadcrumb] = 1
settings[dark_messages] = 0

Of course if you want to over-ride or change any of the settings then you can keep the php and css files and modify them just as you would with any other theme when creating a sub theme, remembering to replace the word 'mayo' with 'newtheme'.

Hope this helps someone.

ptmkenny’s picture

Thank you for these directions. I followed them but I still have two problems. Here are my notes.

1) By following your directions exactly, mayo's default css gets overriden. I fixed this by deleting these lines:
stylesheets[all][] = css/layout.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/colors.css
and then adding the following:
stylesheets[all][] = css/example-overrides.css

2) Although the color selector appears on the subtheme settings page, and I am able to change the colors, the setting appears to have no effect.

ontological’s picture

I see what you mean. I've been experimenting with things and I had some success copying over colors.css to the subtheme and including

stylesheets[all][] = css/colors.css

in the .info file.

SharonD214@aol.com’s picture

Any luck with this, I also see the color picker however I can't get anything other than the default colors to actually appear on the page.

Thanks
Sharon

Anonymous’s picture

Hi

I too have the problem with the color picker, is anybody working on this?

Thanks

dzah’s picture

Hi everybody,

The following procedure works in my case:

1. I have the following declarations in my subtheme's .info file:
name = MAYO MODIFIED
description = Subtheme of MAYO theme
core = 7.x
base theme = mayo
stylesheets[all][] = css/layout.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/colors.css
stylesheets[all][] = css/mayo_mod.css

+ regions

In my subtheme directory:
2. /color directory is copied from the basetheme
3. /css directory contains the 4 above-mentioned files:
css/layout.css
css/style.css
css/colors.css
css/mayo_mod.css
The last one is empty, first three are from the base theme.
4. /images is empty
5. /templates is empty

fishfree’s picture

Thank you! It works!

mermentau’s picture

Status: Active » Closed (works as designed)
SharonD214@aol.com’s picture

Status: Closed (works as designed) » Active

I have my subtheme set up as indicated in #8, however still selecting custom colors and settings, do nothing to the subtheme, only the default colors are showing

mermentau’s picture

@Sharon, Take a look at the Mayo module files and see all the color module related files. To use the color module in your sub-theme you need those. Look at the documentation on the color module. Your problem is not with Mayo I believe, but just general implementation of the color module in a sub-theme. Wish I had time to be more specific.

SharonD214@aol.com’s picture

I had already copied all the color files in the mayo theme into my subtheme, so I'm not sure what I need to do to the Color module. The color picker shows up. Also it's not just color, other settings made in the mayo subtheme are occurring either - eg rounded corners.

Thanks
Sharon

mermentau’s picture

SharonD214@aol.com’s picture

Mermentau - I checked out the video but still no luck. Mayo makes a folder with custom colors.css in it (which my subtheme does properly), but is not pointing to the correct css file. I think this will fix it but am not sure how to go about doing this. It has placed the custom colors.css in a folder /default/files/color/subtheme-ebd7c107. My subtheme is located at sites/all/theme/subtheme

Thanks
Sharon

mermentau’s picture

@Sharon, I'll try to put together a quick sub-theme and upload it with the dev version of Mayo. This will stand as an example for you and any other Mayo users that are new to sub-themes and want to try one. Mayo is often the first try for people new to Drupal and it might help. If it helps we might put it in the next release version. Shouldn't take too long depending on interruptions.

SharonD214@aol.com’s picture

That would be great!

Thanks
Sharon

mermentau’s picture

OK the sub-theme for Mayo is committed to the dev release. Please let us know it helps and any suggestions for the README file.

SharonD214@aol.com’s picture

The dev 7.x-1.x-dev is dated Dec 2011. Is that the one?...

Sharon

mermentau’s picture

No. It take a little while to package.

SharonD214@aol.com’s picture

Thanks - It seems to be working now with your subtheme, though I'm still not sure mine was not as it appeared to be the same...

Sharon

mermentau’s picture

Status: Active » Fixed

Glad to see it's working for you.

Status: Fixed » Closed (fixed)
Issue tags: -subtheme

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