Custom formatter for a multi-valued field I have a multi-valued image field and I'd like to use its delta value with the Custom Formatters module. What I want to do would be really simple with html+tokens if it were to work:

&lt;div id="cf"&gt;
  &lt;a href="[node:url]"&gt;&lt;img class="bottom"  style="border:0;"src="[node:field_image:0]" alt="[node:title]" &gt;&lt;/a&gt;
  &lt;a href="[node:url]"&gt;&lt;img class="top"  style="border:0;" src="[node:field_image:1]" alt="[node:title]" &gt;&lt;/a&gt;
&lt;/div&gt;


However, I don't see the option for the delta value available in the list of tokens available, and using that code would just end up with [node:field_image:0] and [node:field_image:1] being replaced as src="" 

Could you please advice me on how to do this? I think I need to use php but I don't know how. Thank you very much!
here a sample for rendering (image) fields but you can easily access to other fields of entity:

$output = '';
foreach ($variables['#items'] as $item) {
  $output .= theme('file_link', array('file' =&gt; (object) $item));
}
return $output;


Another line example for manual image rendering:

$output .= '&lt;img typeof="foaf:Image" src="'.image_style_url('YOUR_IMAGE_STYLE', $your_entity-&gt;your_field['und'][0]['uri']).'" alt="'.$your_entity-&gt;your_field['und'][0]['alt'].'"/&gt;';