Closed (fixed)
Project:
Styles
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2011 at 09:34 UTC
Updated:
2 Oct 2011 at 20:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
fabsor commentedHere is a patch for that.
This patch creates a feature that defines the styles in hook_default_styles and then writes an alter function to set the desired preset on in hook_default_presets_alter. It seems that it needs to be done that way since the presets for all styles is set in hook_default_presets(). This also makes the code a bit of a hack, but the win is that the patch is completely non-intrusive, and does no API changes at all.
I think we should have a look at exporting styles with CTools in upcoming versions. Doing that right now would break the API badly however, so I don't think it is appropriate for this release.
Comment #2
skruf commentedThanks for the quick response fabsor. Seems to work well. I'll update if we find any issues.
Comment #3
roborn commentedAll good here. :)
Comment #4
fabsor commentedI experienced issues when using the new media 2.x branch together with file entity. This updated patch seems to solve the problems.
Comment #5
fabsor commentedThe patch above didn't contain everything. Here is an updated version.
Comment #6
mlncn commentedLooks good.
Comment #7
aaron commentedawesome, thanks! got that committed now.
Comment #8
jwilson3This is great!!! However there is one error thats happening now, because of this code inclusion: #1283280: Undefined variable: module in styles_style_features_export, maybe the original patch creator from this thread could have a look...