JohnAlbin’s picture

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

I was just looking at this. It seems like it would be really, really easy to add this integration. Just preprocess in the $skinr variable into the $classes_array.

Anyone want to roll a patch for it? :-D

Jacine’s picture

Assigned:Unassigned» Jacine

Sure, I'd love to. I'll do it this weekend. :)

Jacine’s picture

Status:Needs review» Active
new3.83 KB
new353 bytes


Well, I totally forgot that Zen doesn't have views template file. Panel panes work out of the box with Zen because it also uses $classes and your code takes care of it (I added it during zen_preprocess()). However, views-view.tpl.php goes the manual route.

I'm not sure if you are interested in adding the views template file, so here are 2 patches ;)

Jacine’s picture

Status:Active» Needs review
Jacine’s picture

new3.95 KB

Sorry, use this one. There was a slight boo-boo in the other. Also, an unwanted side effect (in this case) the hook name gets added to the class names. I have overriding views_view, like so:

 $vars['classes_array'][0] = 'view';

Not sure if that's how you would want to do it.

Jacine’s picture

Status:Active» Needs review
new3.8 KB

Holy crap... That was the wrong patch. I need to stop doing this stuff at 4 AM. Time to go to bed. Sorry for the inbox overload.

This is the right one (hopefully).

JohnAlbin’s picture

Title:Integration with Skinr?» Integration with Skinr module
Component:Miscellaneous» PHP Code
new4.15 KB

I updated the zen_preprocess() function to prevent PHP warnings on templates where $vars['skinr'] is undefined. I also updated the if statement so that Zen continues to skip building a $classes_array when a module is already using $classes for other uses (i.e. views-view-list.tpl.php, etc.) Also, updated comments in the tpl.

JohnAlbin’s picture

Status:Needs review» Fixed


Jacine, I put you in the CHANGELOG twice. :-)

- #661628 by Jacine and JohnAlbin: Integration with Skinr module
- by Jacine: Added views-view.tpl.php with support for $classes variables.

Jacine’s picture

Yay, awesome! Thank you :D

ChrisBryant’s picture

This is great, you guys ROCK! :-)


Jacine’s picture


Well, I should have asked merlinofchaos before just putting this patch up, so to make up for it I wrote a patch. If he adds it, Zen wont need it but what do you think about it?

JohnAlbin’s picture

FYI, the views-view.tpl.php that Jacine added is for Views 2.

Merlin wants to add $classes to Views 3, which is still in alpha, so its all good.

Status:Fixed» Closed (fixed)

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