I've been doing a lot of theming with views as of late
and have been a little frustrated in the different paths and directions that theming can take
Im using drupal 7 and views 3 and have been looking towards unformatted and fields style
is there any advantage of using fields over node - At the moment I cant see a lot as the fields tend to be more verbose than using a node type would make more sense
Im assumming the field type is used mainly in conjunction with the views and field tpls - Im staying away from these and tend to put all my logic in a preprocess and output to one single tpl file mainly a unformatted view tpl
Im was wondering has anyone any success in using
[code]
foreach ($view->display->handler->get_handlers('field') as $field => $handler) {
$options[$field] = $handler->ui_name();
}
[/code]
in particular the
$view->display->handler->get_handlers('field')
its taken from
http://drupal.org/node/903250
for some reason it doesnt work in the preprocess
at the moment my preprocess function are begining to look like when pulling values from the vars['view']
$view->result['0']->_field_data['nid']['entity']->field_my_field['und']['0']['value']
My gut feeling is that there must be a better way
If I were using node instead of fields would i be better using a preprocess on the node and a tpl such as node__my_view <<