File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1002,7 +1002,7 @@ function ddbasic_preprocess_views_view_responsive_grid(&$vars) {
1002
1002
1003
1003
// Loop over the rows to add the correct classes to the row based on the
1004
1004
// number of columns in the row.
1005
- foreach ($ vars ['rows ' ] as $ row_number => $ row ) {
1005
+ foreach ($ vars ['rows ' ] as $ row_number => & $ row ) {
1006
1006
switch (count ($ row )) {
1007
1007
case 1 :
1008
1008
$ vars ['row_classes ' ][$ row_number ] .= ' group-blocks--one ' ;
@@ -1021,6 +1021,9 @@ function ddbasic_preprocess_views_view_responsive_grid(&$vars) {
1021
1021
break ;
1022
1022
}
1023
1023
1024
+ // Reverse columns to make the most important at top (make --one at top).
1025
+ $ row = array_reverse ($ row );
1026
+
1024
1027
// Add column classes to the current row.
1025
1028
$ column_id = 0 ;
1026
1029
foreach ($ row as $ column_id => $ column ) {
@@ -1030,5 +1033,9 @@ function ddbasic_preprocess_views_view_responsive_grid(&$vars) {
1030
1033
// Add last class to last column.
1031
1034
$ vars ['rows ' ][$ row_number ][$ column_id ]['classes ' ] .= ' last ' ;
1032
1035
}
1036
+
1037
+ // Reverse rows.
1038
+ $ vars ['rows ' ] = array_reverse ($ vars ['rows ' ]);
1039
+ $ vars ['row_classes ' ] = array_reverse ($ vars ['row_classes ' ]);
1033
1040
}
1034
1041
}
You can’t perform that action at this time.
0 commit comments