Make a new Image SRC

Permalink
So, I am trying to make a custom Page List view.php.

The code:
<?php
$img = Core::make('html/image', array($thumbnail));
$tag = $img->getTag();
$tag->addClass('img-responsive');
echo $tag;
?>

That makes:
<picture><!--[if IE 9]><video style='display: none;'><![endif]--><source srcset="" media="(min-width: 900px)"><source srcset="" media="(min-width: 768px)"><source srcset=""><!--[if IE 9]></video><![endif]--><img src="" alt="#" class="img-responsive"></picture>

I want 1 single image [<img src="" alt="#" class="img-responsive">], not all that extra stuff.

mdius
View Replies:
hutman replied on at Permalink Reply
hutman
You should be able to just do something like this

if($thumbnail) {
echo '<img src="'.$thumbnail->getURL().'" alt="#" class="img-responsive">';
}
mdius replied on at Permalink Reply
mdius
Oh, that is perfect!!! Simple too.

I was able to get it to only load the single image, but I like this way much more!