Ive been playing around with drupal 7 and views over the weekend
Im having trouble in getting some custom theming done with the unformated style
My issue is that I would like to be able to control the exact location of all my fields from the view - at the moment this seems to be controlled by the order in which they are created (though this can be changed, full control is not in one single location)
I've had a look at the api theme for some preprocess functions and have found this one
function mytheme_preprocess_views_view_unformatted(&$vars) {
$view = $vars['view'];;
$rows = $vars['rows'];
// print_r($rows);
//print_r($view);
}
The issue here is that the rows variable is just an indexed array with a string output so its impossible to use this directly to modify the order, it also appears that you cant pass $vars['view']; to the tpl using
$vars['temp'] = $vars['view'];
My question is this, Is hook_preprocess_views_view_unformatted the proper location to change the order of my fields - the only way I could do it is to rewrite the $rows fields from using the $views object in the preprocess