I need to order my field in a node_preprocess to display it in a ul.
I have this field:
body,
field_cover[image],
field_gallery[2 imgs with title..],
field_video [a link list.. rendered with videojs module],
field_video_desc [a text field..]
I need to render they in 2 lists:
function mytheme_preprocess_node(&$variables){
$rendered_field = mytheme_field_HTML($variables);
$element = array (
$rendered_field['field_cover'],
$rendered_field['field_gallery_0'],
$rendered_field['field_gallery_1'],
$rendered_field['video'] );
$text = array (
$rendered_field['body'],
$rendered_field['field_gallery_0_title'],
$rendered_field['field_gallery_1_title'],
$rendered_field['video_desc'] );
$variables['elements'] = theme_item_list(array('items' => $element, 'type' => 'ul'));
$variables['texts'] = theme_item_list(array('items' => $text , 'type' => 'ul'));
}
but I need to write mytheme_field_HTML() function and I don't understand how, using Field API, I can retrive the HTML according the default field display used in the current node.
How can I achieve this?