I noticed there is way to select different themes to use (currently blackblue and original) or have your own custom theme.

Problem with custom theme is that when you begin to use 2 differing themes (separate theme for frontend and one for admin), you need to duplicate the same styling and place them into both theme folders.

So the other method i did was to create a new theme and place this in the simplemenu theme folder. Probably not the proper or best way to handle this. However, this seems to get picked up in Simple menu settings dropdown list but when selecting this new theme it failed to pick up any of the stylings from new theme. I've even tried to clear the cache but still not working. I'm i doing something wrong?

Basically, i'm trying to keep all theme styles in one central place so i do not have to replicate it on each site theme i want to use and make it more manageable.

As a feature request (if it could be one), wouldn't it be good for the custom theme to have a text field where user can point the path to the custom theme they want to use?

Thanks,

Comments

AlexisWilke’s picture

Hi Duvien,

You found the two available ways to setup new themes for Simplemenu.

I guess that what you're saying is that if a theme provides a custom CSS to re-theme simplemenu, then it should be used whatever the selection in simplemenu? This may be a priority problem. But I would think that your theme is loaded after simplemenu and thus can override all the simplemenu CSS entries from the currently selected theme. Did that not work? Or is your question something else?

Thank you.
Alexis

onejam’s picture

Switching to custom theme and then add the styling for simple menu to the site theme in use works fine. The problem is when you have two different themes (one for frontend and one for admin). You would have to duplicate the styles and then apply it to both themes since Simple Menu shows up on both. For maintainability it becomes cumbersome having to duplicate the styling for Simple Menu.

The other method (i thought) was to create a new theme within the simple menu theme folder so that i do not have to worry about which site theme is in use since it will load the simple menu styling from same location (ie simple menu module theme folder). However, this doesn't work, the new simple menu theme shows up in the dropdown list in Simple Menu settings page where you can select a theme to use. But when i selected the new theme for simple menu, no styling gets loaded. Not sure if it has anything to do with the simple menu variables being cached? i did clear the cached but still it doesn't seem to load the new simple menu theme.

I'm currently using this along with admin menu (but for users only not admin) and is in the process of styling simple menu to make it look the same. I think this will be a good inclusion to your simple menu themes but just can't get it to work trying to place it in the simple menu theme folder?

Is there something i need to do?

Thanks,

AlexisWilke’s picture

Duvien,

Did you name the file something like this:

simplemenu/themes/duvien/duvien.css

As you can see it has to be in a sub-folder and the CSS file needs to be the same as the sub-folder + .css.

Thank you.
Alexis

onejam’s picture

Right, ok i didn't know the CSS file had to match theme folder name as well. Yep, that works thanks.

Was this documented somewhere? if not, perhaps the this info should be added to the docs.

Thanks for your help.

onejam’s picture

StatusFileSize
new3.15 KB

Here's the theme that i did based on the admin menu styling (most of it anyway).

Only did this last hour and not tested in IE. Will find time tomorrow to test it on different browsers.

Anyone want to try it out, to install, unzip and drop it into your simple menu theme folder and in the simple menu settings page, select 'simpleblack'

Thanks,

onejam’s picture

StatusFileSize
new3.28 KB

Oops sorry found an issue, please ignore the beta1 and use this one...

thanks,

AlexisWilke’s picture

Hi Duvian,

I guess I did not really write that much documentation for the SimpleMenu module yet... 8-)

There is a first version in regard to custom theming:

http://www.m2osw.com/doc_simplemenu_custom_theme

Comments welcome (on that very page or in this issue.)

I'll be testing your simpleback theme shortly.

Thank you.
Alexis Wilke

onejam’s picture

StatusFileSize
new3.23 KB

That's a great documentation, very easy to follow thanks. I think the link should be added to this module page.

Had some time to test it in IE 6 7 8, Firefox, Safari and Chrome. It seems to work fine though the design on IE6 looks rubbish but functional so i think that's good enough.

I had to remove Opacity for all IE as it was causing issues for 2nd and 3rd level navigation to not appear. Not sure why, maybe it has something to do with the js script?

Anyway, i'm marking this version as stable (simpleblack_v1.0), see attachment.

I hope you'll consider adding this theme to your module, thanks.

onejam’s picture

StatusFileSize
new3.24 KB

Sorry this is not my day. Just realised the name of the theme is wrong, should be simpleblack and not simpleback. I've reuploaded the theme with the correct name.

(Wish i could edit a post and remove attachment to replace with new one)

AlexisWilke’s picture

Status: Active » Fixed

Duvien,

Cool. I checked really quick and it works neatly. 8-)

It is checked in and will appear in the next version.

Note that the theming capability is not listed on the home page, however there are links to the documentation. Now that one page about theming is new. I just wrote it. 8-)

Thank you for sharing!
Alexis

j. scott elblein’s picture

Looks great Duvien, much appreciated!

For the record, I had a problem (on 5.x) getting the "Theme" dropdown menu in the admin settings to pickup the new theme and show it in the list after copying the folder to the SM/Themes folder. I know I uploaded it correctly, but no matter ho wmany times I refreshed the admin page, or even empty the site cache it would never show in the list. I ended up having to hard code it in simplemenu.module like this:

'#options' => array('original' => 'original', 'blackblue' => 'black & blue', 'simpleblack' => 'simpleblack', 'custom' => 'custom'),
'#default_value' => variable_get('simplemenu_theme', 'original'),

Not sure if I did anything wrong, but I couldn't see any other way.

AlexisWilke’s picture

GeekDrop,

The dynamic drop down is new in SimpleMenu 1.3 or 1.4. You have done what is necessary in 5.x to make it work there.

Thank you.
Alexis

j. scott elblein’s picture

Ok, Thanks Alexis,

So far I'm loving simple menu and the new theme. I've noticed a couple of small problems though. I though I'd make up a detailed screenshot to help better describe them, which is here: Click

Also, in the new theme, is there a way to make the menu items that expand-right, have the hover color at all times, the same way the Admin menu css does? I think it adds a nice touch. I'm not much of a CSS person (yet) so I figured it'd be easiest to just ask.

AlexisWilke’s picture

GeekDrop,

Is that a test with 6.x or 5.x?! My test did not result in such problems. Although, what browser & version are you testing with?

(1) Menu colors stay the same -- could it be that this is the page you are on?

(2) Comments out of whack -- no idea. I did not see any such problem. Your theme may have the exact same class name which forces that width and has a negative margin or something of the sort... In that case, there is a conflict.

(3) Deeper levels show offscreen -- yes... that's a problem for menus that are very tall as well! In your case, what you can do for now is go to your menu and (a) create new menu items and (b) move items in those new parent menu items. This is a very simple trick to reduce the width of your menu. I have a website where I had enough to fill two screens in width. Now I have a drop down that goes 2/3rd of the page down... with all those items that I hardly ever use anyway.

Thank you.
Alexis

onejam’s picture

Try switching the theme back to default Garland to see if there are any issues? and check if any CSS are overriding the simple menu styling?

j. scott elblein’s picture

Alexis,

This is still for 5.x. I've been hesitant to upgrade to 6.x with 7.x right around the corner, and am not really looking forward to dealing with all of the upgrade issues only to have to do it again real soon for 7, but lately with how long it's taking them to get a final 7 out, I've been reconsidering ...

The browser being shown in the screenshot is the latest Firefox. I haven't looked into it with any other browser yet, since I'm almost 100% a FF user, and have just been getting simplemenu setup for now.

1.) aha! I wasn't aware that it was set to keep the active page highlighted, yes that is it. Problem solved! =)

Duvien,

This is actually happening on the default Garland theme. I've mainly only customized the logo and very little css.

Thanks for the other tips guys, looks like I have some investigating to do today. Regarding the hover/highlight color I asked previously, is there a quick and easy line of css that I can add for that?

Thanks!

AlexisWilke’s picture

GeekDrop,

The superfish CSS is definitively weird (so it is for all menus.)

To prevent the color change, you'll need to define extra a.<class> entries. Those that show the currently selected menu. Look at the HTML code for more info.

Thank you.
Alexis

j. scott elblein’s picture

Thanks again Alexis, now that I know it's not just a random thing, and is actually showing the active page, I don't mind it being that way.

I tested the new CSS theme on the latest Opera, Chrome, Firefox and all were fine (with the exception of the screenshot stuff I showed), but in IE8 I'm getting a big white box to the right of any menu that has more levels to expand. Here is a screenshot of what's happening: Click

AlexisWilke’s picture

GeekDrop,

Hmmm... Fun fun fun! Do you need to make it work for IE?! 8-)

I don't remember why you get that.

It could be a width/height problem, although it feel like something else...

http://linux.m2osw.com/ie_size_problem

You may also want to compare the CSS files from 6.x-1.x-dev and the 5.x version you are using.

Did you try Drupal 6 at all? Do you have the same problem in D6?

Thank you.
Alexis

Status: Fixed » Closed (fixed)

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

j. scott elblein’s picture

I'm in the process of upgrading to D6 (uuuuugggghhhhh) and so far it seems like the problem doesn't happen in D6. I gave up on trying to figure it out in D5 since I'm gonna upg, lol.

AlexisWilke’s picture

8-)

Probably a good idea.

Note that to upgrade to D7, you would have had to upgrade to D6 first...

Alexis