0
votes

I have a view for news content type I overrige the view's template grid style output In Row style output:views-view-fields.tpl.php overriding every thing seems ok except image field! I print tilte and description and every other thing using print `$fields['fieldname']->content;

but print $fields['field_teamimage']->content; " class="img-respo" alt="team img 1"> displaying nothing!

How can I print image field inside Only local images are allowed. inside my custom views-view-fields.tpl.php I spent all my day trying and searching without a result Thanks

1

1 Answers

0
votes

For this you need to override filed template file Field Content: Images of property (ID: field_teamimage) and after that you can add img src there, something like

<img class="img-responsive" alt="team img 1" src="<?php print file_create_url($row->_field_data['nid']['entity']->field_teamimage['und'][0]['uri']); ?>"/>

You can even add image src directly in src.