How do I theme repeating dates output field? I currently have a calendar of events and each event has multiple repeating dates. Now when i display them it shows all those repeating dates in a long list. How would i theme this to show only if there are more than 3 dates to display": 

Has multiple dates in the coming month

I was thinking of doing this via tpl's, but what should i name my tpl as to override this output?
Using template_preprocess_field seems to do the trick. You can either put this in your themes template.php or in a custom module.

function YOUR_THEME_preprocess_field(&amp;$variables) {

    $most_repeating_dates_to_show = 5; // set limit of how many repeating dates is acceptable to show

    if($variables['element']['#field_name'] == 'field_date') { // Put your actual field name where it says "field_date"

        $num_repeats = count($variables['items']); // get count of how many repeating dates there are

        if($num_repeats &gt; $most_repeating_dates_to_show) {

            $nid = $variables['element']['#object']-&gt;nid; // get the nid of the parent node

            // set the title of the link to show how many repeating dates there are
            $link_options = array(
                'attributes' =&gt; array(
                    'title' =&gt; t('See all :num repeating dates', array(':num' =&gt; $num_repeats))
                )
            );

            $link = l('Has multiple dates', 'node/'.$nid.'/repeats', $link_options);

            $variables['items'] = array(0 =&gt; array('#markup' =&gt; $link)); // here we overwrite the whole array of items so only our link will show

        }

    }

}


I've added a bit of extra functionality turning your text "Has multiple dates" into a link that links to the full list of repeating dates.