Bart Dabek
Post count: 24
|
Is there a way to specify a css class or id to be added to an image ie in
$video->featured_image->resize(“w=239&h=181”)
|
Bart Dabek
Post count: 24
|
Sorry got this figure out… however is it possible to do this on one line?
$video->featured_image->attr(‘class’,’bdr-img’);
echo $video->featured_image->resize(“w=239&h=181”); ?>
|
traversal
Post count: 207
|
Hey Bart. Yep you can do this on one line. Internally, the string output of that field calls into a “tag” method which you can explicitly call like so:
http://pastie.org/7971336
|
Bart Dabek
Post count: 24
|
That worked perfectly thanks so much… one last question on this topic… any plans on including default image feature within the image class? So that we don’t have to do the ifelse statement?
|
traversal
Post count: 207
|
No problems. No plans as yet, but noted for the future.
|