1

I was trying to edit my view theme with php in the file views-view-field--homepage-banner--block--field-site-image.tpl.php and try to print view fields, but values come's empty. any ideas?

Code example:

<?php $link=$fields['field_site_image_link']->content; $src=$fields['field_site_image']->content; $link2 = '/' . strip_tags($fields['field_site_image_link']->content); print $src; print $link2; ?> <a href="<?php echo $fields['field_site_image_link']->content; ?>"><?php echo $fields['field_site_image']->content; ?></a> 

1 Answer 1

0

1- clear cache
2- take the views-view-field.tpl.php source as a starting point for doing what you need also have a look at documentation at the top of the file

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.