I have a view with some fields wich I theme inside views-view-fields--MYVIEW.tpl.php. I use a phptemplate_preprocess_views_view_unformatted__MYVIEW() to preprocess some $vars before the template to have the template as clean as possible. But I don't know the right way of preprocessing the fields.

I can access the fieldcontent in the template via $fields['MYFIELD']->content. Inside the preprocess function I can't find this explicit content value. All I see is something called last_render but i'm not sure it's ok (the right way) to use/change this value.

2 Answers 2


Try to use debug() to see the content of $vars. As far as I know, in views/themes/theme.inc there are many examples of preprocessing functions.


Try dsm($vars). It allows you to see the contents of $vars clearly. Note that you need the Devel module to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.