0

I am using Views with "Format Show:Content" instead of "... fields."

I have a multilingual website. In the filters section of Views I have Content: language = user's default language. However, Views refuses to honor this filter selection.

I am also using views-view-fields.tpl.php file to output the fields. currently it is calling, for example, $fields->content to output content.

How can I get Views in Show Content format to honor the language filter? I am familiar with needing to add the 'und' key to certain fields at times, but do I need to do that here? Should adding the filter in the view not be enough? If I do need to add the key where does it go?

If you want, you can see the error in the slideshow at http://goniseko.com

1

Use dpm() to output $field in your template.

To make PHP not die with an out of memory error, use a static flag to ensure it only prints once.

static $_foo;
if (!$_foo) {
  dpm($field);
  $_foo = TRUE;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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