How to theme a list based field I have a text field attached to my node.
The user can add an unlimited number of values.

I want to out put all the values as a HTML list in my node.tpl.php file.

Contemplate module suggests to use the following code to out put the field:

&lt;?php print $node-&gt;field_body_list['und'][0]['safe_value'];?&gt;


This, however, has two problems:
1) It only outputs the first value of the field.
2) It uses UND, which is apparently bad. 

I have tried using theme developer, but it doesn't produce any code that I can use in my node.tpl.php file.

Any help would be greatly appreciated it.
It's easiest to stay out of node.tpl.php for this one and instead use a field specific template file.

You'll need two copies of /modules/field/theme/field.tpl.php in your theme folder. The first is an exact duplicate with no changes and the same filename. The second you should rename to field--field-body-list.tpl.php. Consult Drupal 7 Template Suggestions if that filename doesn't work for you.

In field--field-body-list.tpl.php I would change the div with class="field-items" to &lt;ul&gt; and the div with class="field-item" to &lt;li&gt;.