The proper method would be for the controller to pass the width and height measurements then have the template put it all together similar to how alt and title tags work. Something like:storm-cloud wrote:Ryan, could you clarify why this method would be considered sloppy code? Is it bad practice to call these attributes within a model/tool file?
Code: Select all
<img src="<?php echo $thumb; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" alt="<?php echo $heading_title; ?>" />
Code: Select all
http://store.com/image/cache/data/image-60x60.jpg
Code: Select all
http://store.com/image/cache/data/image-60x60.jpg" width="60" height="60