Hi folks!

I would love to support or help (I'll need some guidance) the ability to specify a custom css file per theme, not just in global settings. Any takers?

Thanks!

CommentFileSizeAuthor
#11 custom_none_nm.patch521 bytesmariama__

Comments

add1sun’s picture

Version: 5.x-1.1 » 6.x-1.x-dev

Yeah, I can definitely see the point of this one. In just poking at it, we'll need to make a hook_form_alter for each theme admin page dynamically.

I'm gonna mark this as a feature for 6 since that is where all new work will happen now. we can always backport to 5 once we get something worted out.

greggles’s picture

this seems to me like a better enhancement to add to a module that focuses on adding css to sites, like http://drupal.org/project/css_injector

add1sun’s picture

Hm, I can see where you are coming from with CSS injector but I'm not sure I want to make folks go use yet another module. I'm not in a hurry to implement this though so I'd like to think about it more. I mean honestly if folks want different NM CSS per theme they can already just add it to their style.css and be done with no muss. Hm. Yeah, I just dunno on this one so I'm willing to sit on it for now.

add1sun’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

I think once I start working on prepacked styles you can select (http://drupal.org/node/219512) I will get rid of the global nice_menus hook_form_alter anyway. Still not sure of the best way to deal with "per theme" CSS so I'm moving this to HEAD since it will only go in V2 of Nice menus if it goes in anywhere.

danilopuy06’s picture

I already encounter this problem but I solve it already

Try this copy the code of nice_menu css then paste it to your main css

example your nice menu css name nice_menu.css then your main css for theme is style.css so open the nice_menu.css then copy the entire code then paste it to your style.css do you get it?

danilopuy06’s picture

if you have any problem you can email me at danilopuy06@yahoo.com ill try to help ;)

Just want to help

add1sun’s picture

Status: Active » Closed (won't fix)

As things move forward I've decided to won't fix this. If you want nice menu theming per theme, the theme should be able to handle it quite nicely (especially in D6). Either add the CSS to the style.css or copy the nice menus default css to your theme, edit it up and then add that stylesheet to your theme's .info file. This is something that "makes sense" to themers and lets the control stay down at the theme level, rather than up at the module level. I don't think Nice menus should get into this.

jastern’s picture

okay, thanks danilopuy06 and add1sun.. posts #5 and #7 are good info for themers on multi-site and multi-domain (http://drupal.org/project/domain) drupal installations to know about. perhaps it would be helpful to add this info to:

  1. the "documentation" page at http://drupal.org/node/185543 (in the Customization section)
  2. the module's README.txt

? (i can submit a patch if necessary, for the latter, if it will help)

theshanergy’s picture

Status: Closed (won't fix) » Active

Adding the CSS to each theme is great, but your still left with the question of what to do about the Nice Menu default styling?

How about an option to disable the Nice Menus default CSS without referencing a new css file? or support <none> in the current "Path to custom Nice Menus CSS file" field? I always keep my menu CSS in my themes style.css, and usually end up just making reference to an empty menu.css file to remove the default styling - though this is not optimal.

*edit - I'm not sure how to make patches, but I think this could be done by modifying line 233 of nice_menus.module to the following:

  if ($custom != '<none>') {
    drupal_add_css($custom);
  }
add1sun’s picture

Title: allow custom css per theme » provide option to disable all NM CSS

changing title to match the request

mariama__’s picture

StatusFileSize
new521 bytes

I created this patch from my own repository. I don't know if this is the right method? I'm just a n00b when it comes to svn.

add1sun’s picture

Status: Active » Needs review

This isn't an ideal longterm soultion, but definitely something that would be useful in the interim. I'll try to review this in the next week or so.

willeaton’s picture

Hi, there is a simple solution to overriding the css generated by the module. Copy the two css files from the nice_menus module folder into your template folder. Open up the .info file of the template and add...

stylesheets[all][] = nice_menus_default.css
stylesheets[all][] = nice_menus.css

Then clear your cache. This tells drupal to override the module's css file with your own. That way you do not need to write neutralising css code to counteract that of the module, you just override the file and empty it (or add your own in if you wish).

Thanks
Will Eaton
http://www.williameaton.co.uk

add1sun’s picture

Status: Needs review » Postponed

Postponing this until D7.

add1sun’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Scott J’s picture

Re: #9

but your still left with the question of what to do about the Nice Menu default styling?

It seems that the default styling is easy to deal with. I discovered by accident that if you give your custom css file the name nice_menus.css it automatically over-rides the default file.

Is this a documented feature?

xiukun.zhou’s picture

Issue summary: View changes
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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