How to render a field collection without default divs? I want to output a field collection using dl, dt and dd tags. The collection has two fields - field_heading and field_text. I want each field_heading to be a dt, each field_text to be a dd and to wrap the whole set in a dl.

I have achieved this by overriding field--my-collection--my-content-type.tpl.php and the field--my-field.tpl.php for the heading and text fields.

The problem is, a div is being generated on each item in the field collection (by the field collection module I believe). (div class="field-collection-view clearfix view-mode-full") This div wraps the heading and text elements together. The div is therefore inserted inside the dl but before the dt. This is a problem because the dt needs to be a direct child of the dl.

Is there a way to render the field collection without this div?

field--my-collection--my-content-type.tpl.php

&lt;dl class = 'accordion'&gt;
&lt;?php foreach ($items as $delta =&gt; $item){ ?&gt;
    &lt;?php print render($item); ?&gt;
&lt;?php } ?&gt;
&lt;/dl&gt;


field--field-heading.tpl.php

&lt;dt&gt;
&lt;?php foreach ($items as $delta =&gt; $item){
    print render($item);
} ?&gt;
&lt;/dt&gt;


field--field-text.tpl.php

&lt;dd&gt;
&lt;?php foreach ($items as $delta =&gt; $item){
    print render($item);
} ?&gt;
&lt;/dd&gt;
You need to override theme_field_collection_view theme function in your template.php .