I've modified the output of a CCK field using a field template. If I display that field in my Views display normally, I see the modified output as expected.

When I check "Exclude from display" for that field and instead include it in another field using a replacement token, I get the unmodified output.

What am I missing?


othermachines’s picture

Category: bug » support

You've probably figured out by now that "Exclude from display" has nothing to do with it. The value output by the token won't be processed by the theme layer regardless.

I take it you used "Exclude" because you are grouping more than one field? Instead of using tokens, maybe try overriding the views-view-fields.tpl.php template file and access the original field value here via the $view->result array.

It may be slightly counter intuitive, but not a bug. Same behaviour is in Drupal 7.

Let us know if you get this figured out.

kwiliarty’s picture

Issue summary: View changes

I was bumping up against a similar problem, and the comment at #1 proved very helpful. I left my overridden field template (views-view-field--myview--myfield.tpl.php) in place and then structured the fields template (views-view-fields--myview.tpl.php) as needed, simply calling the $field['myfield']->content to display the customized output of the field.