I could be wrong, but I believe that the $vars['classes_array'] that is created in template_preprocess_snippet is not properly placed on page for all themes. The tpl file does not reference $classes_array and instead only relies on $attributes_array. I know that Omega sub-themes will have the classes_array moved into attributes_array in the alpha_preprocess function, but I think this is unique to Omega.
I'm using Snippets with the Zen theme and I noticed that they did not have contextual-links-region or the snippet class. Not having contextual-links-region assigned causes problems with more than one Snippet on the page. Not having the 'snippet' class means no yellow background.
Path to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | snippent-contextual-link.patch | 3.48 KB | pwaterz |
| #1 | snippet-Classes_array_not_applied_on_all_themes-2036749-1.patch | 624 bytes | jonmcl |
Comments
Comment #1
jonmcl commentedSilly simply patch. I just put the contents of 'classes_array' into ['attributes_array']['class'] which is also what alpha_preprocess does. So this should have no negative impacts anywhere.
Comment #2
pwaterz commentedJonMcL
You are correct, here is an updated patch that will work with non omega themes. I am going to apply this patch and create a new release of the module.
Comment #3
pwaterz commentedComment #4
pwaterz commented