Render a field in node_preprocess 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(&amp;$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' =&gt; $element, 'type' =&gt; 'ul'));
  $variables['texts'] = theme_item_list(array('items' =&gt; $text , 'type' =&gt; '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?
What about leaving the rendering of fields by Drupal and putting your list directly in the template?

Depending the condition about your node rendering, can be based on 1 particular node, or by content type, ... you can use a separate tpl file. For example, if its for a content type gallery, you can create a node--gallery.tpl.php in the templates folder of your activated theme.

Inside the tpl, you can create an HTML structure like this:

&lt;!-- content node part --&gt;
&lt;div class="content"&lt;?php print $content_attributes; ?&gt;&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;?php print render($content['field_cover']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['field_gallery_0']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['field_gallery_1']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['video']); ?&gt;&lt;/li&gt;
    &lt;/&lt;ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;?php print render($content['body']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['field_gallery_0_title']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['field_gallery_1_title']); ?&gt;&lt;/li&gt;
        &lt;li&gt;&lt;?php print render($content['video_desc']); ?&gt;&lt;/li&gt;
    &lt;/&lt;ul&gt;

    &lt;!-- remaining unrendered fields --&gt;
    &lt;?php print render($content); ?&gt;
&lt;/div&gt;