I just did a "drush up" to update this theme on my site. It deleted the local.css file. Is there any way to make Drush do the update while leaving the local.css file alone?

As a workaround so I don't lose the file again I now have a soft link to the file in another location.

CommentFileSizeAuthor
#2 custompathforlocalcss-1922768-2.patch2.57 KBmheinke
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny Englander’s picture

Title: How to keep local.css? » Allow for a custom path for local.css
Category: support » feature
Status: Active » Needs work

Hi Ron,

I have not built in any Drush specific features into the theme. You may want to check in the Drush issue queue and documentation. With that said, perhaps I should allow for a custom path to be set in the theme settings. I'll need to look into that so it could be a while. Feel free to submit a patch. Going to mark as a feature request as I think it would be a good one. You might also check out this interesting conversation on this matter here: http://groups.drupal.org/node/117494

-- danny

mheinke’s picture

Status: Needs review » Needs work
FileSize
2.57 KB

i ran into this problem myself with your theme.

here is my first attempt at a patch. its alittle dirty..but it does work :)

i tried to follow your code style as much as possible,

cheers!

mheinke’s picture

Status: Needs work » Needs review
Danny Englander’s picture

Version: 7.x-1.0-alpha14 » 7.x-1.x-dev
Status: Needs work » Needs review

Hey Matthew, thank you so much! I will take a look at this and test it out. A great feature to have. Changing version to dev as there was a new dev pushed up yesterday.

mheinke’s picture

no problem, i cloned the current stable, wasnt sure how "stable" dev was so introducing a new patch could have broken everything or nothing. who knows.

during review, let me know what fixes you want done and i can reroll it :)

Danny Englander’s picture

okey-dokey, I used the your patch as a base but I tweaked it out some more. It's now in dev if you want to take a look-see at one point. I tested it and it works really well. Note, it probably won't show up on the project page for 24 hours or so.

git clone --branch 7.x-1.x highrockmedia@git.drupal.org:project/bamboo.git
cd bamboo

I got some additional inspiration from:

http://drupalcode.org/project/litejazz.git/blob/2ed0c38237388c530946d29c...
http://drupalcode.org/project/litejazz.git/blob/2ed0c38237388c530946d29c...
http://leepowers.net/drupal-css-load-order (loading a path variable with weight -- that really stumped me for a while e.g.
drupal_add_css("$path/mytheme.css", array('group' => CSS_THEME, 'every_page' => true, 'weight' => 9999));)

Thanks again!

mheinke’s picture

awesome!

Danny Englander’s picture

BTW, more of a note to myself here but I'll make sure to give you credit in Git when I commit the updated documentation and change log for this.

--author="mheinke <mheinke@615306.no-reply.drupal.org>"

Danny Englander’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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