Drupal8如何像D7那样在覆写 Views 模板

<?php foreach ($view->result as $k => $v): ?>
<?php
  //dpm($v->_field_data['nid']['entity']);
  $slides=$v->_field_data['nid']['entity'];
  $style='large';
  $imguri = $slides->field_image['und'][0]['uri'];
  $imgalt = $slides->field_image['und'][0]['alt'];
  $imgtitle = $slides->field_image['und'][0]['title'];
  $imgsmall = image_style_url($style, $imguri);
  $imgbig = file_create_url($imguri);
?>
<?php endforeach; ?>

在DRUPAL7里可以在views模版里写代码,在drupal8如果实现呢?

-- Drupal社区团队 编辑 2017-03-06 09:51 --

打赏一下,鼓励Ta创作更多好内容!

评论