D7 theme field items of a "List (text)" input as In Drupal 7, I have a field for a custom node type that is a text list "List (text)" with a widget input type of "Check boxes/radio buttons". When displayed on the front-end the following HTML is generated:

&lt;div class="field-items"&gt;
  &lt;div class="field-item even"&gt;XHTML&lt;/div&gt;
  &lt;div class="field-item odd"&gt;CSS 3&lt;/div&gt;
  &lt;div class="field-item even"&gt;PHP&lt;/div&gt;
&lt;/div&gt;


How can I theme this output as an HTML &lt;UL&gt; instead? Something like this:

&lt;ul&gt;
  &lt;li&gt;XHTML&lt;/li&gt;
  &lt;li&gt;CSS 3&lt;/li&gt;
  &lt;li&gt;PHP&lt;/li&gt;
&lt;/ul&gt;


I should note that I'm overriding output using a node--custom_type.tpl.php file.
The "right" way of rendering a list, that is, one that interacts properly with all the other systems in Core is theme_item_list.

Code example:

// In this case, $result is a list of nodes returned from a database query.
$list = array();
$list['type'] = 'ul';
$list['title'] = 'List of nodes';
$list['attributes'] = array('class' =&gt; array('list-of-nodes'));
$list['items'] = array();
foreach($result as $record) {
  $list['items'][] = l($record-&gt;title, 'node/' . $record-&gt;nid);
}
$output = theme('item_list', $list);


This should be applicable in your node.tpl as well.