Добрый день. Темизирую views-view-fields.tpl.php (views-view-fields--lastthreenews.tpl.php), подключаю его во вьюсе, но выдает оишбку
warning: Invalid argument supplied for foreach() in /home/sveta/apache/vhosts/abc/sites/all/themes/demo/views-view-fields--lastthreenews.tpl.php on line 22
, так как $fields выводит NULL.
Помогите, что это может быть.
Комментарии
Для начала, скопируйте родной код
Вот родной, я его не меняю и все равно сразу ошибка
<?php foreach ($fields as $id => $field): ?>
<?php if (!empty($field->separator)): ?>
<?php print $field->separator; ?>
<?php endif; ?>
<<?php print $field->inline_html;?> class="views-field-<?php print $field->class; ?>">
<?php if ($field->label): ?>
class; ?>">
<?php print $field->label; ?>:
<?php endif; ?>
<?php
// $field->element_type is either SPAN or DIV depending upon whether or not
// the field is a 'block' element type or 'inline' element type.
?>
<<?php print $field->element_type; ?> class="field-content"><?php print $field->content; ?>element_type; ?>>
inline_html;?>>
<?php endforeach; ?>