editing the view of the default image block
Permalink 1 user found helpful
hi.
i need to remove parts of the output of the image block. (remove the width="" and height="")
so i thought ok i will just copy the image block from concrete/blocks/image and then edit the view.php to not output the widths and heights that are playing havoc with my responsive design.
i find that the view just has:
and the controller has:
does anyone know how i can find the parts that output anything? as i dont know where to look next.
thanks :)
i need to remove parts of the output of the image block. (remove the width="" and height="")
so i thought ok i will just copy the image block from concrete/blocks/image and then edit the view.php to not output the widths and heights that are playing havoc with my responsive design.
i find that the view just has:
and the controller has:
does anyone know how i can find the parts that output anything? as i dont know where to look next.
thanks :)
sorry, the base controller.php code you want to use for the controller is located in concrete/core/controllers/blocks/image.php
check out the block i posted here for a already working copy if you're interested. only modification made to it is appending base-url to href for rss feeds that pull images...
http://www.concrete5.org/community/forums/customizing_c5/full-url-i...
check out the block i posted here for a already working copy if you're interested. only modification made to it is appending base-url to href for rss feeds that pull images...
http://www.concrete5.org/community/forums/customizing_c5/full-url-i...
ok thanks.
guess i would just need to comment out the one line:
guess i would just need to comment out the one line:
//$sizeStr = ' width="' . $thumb->width . '" height="' . $thumb->height . '"';
looks like it should work!
I think this line is for the thumbnail .. did it work?
hmm when i edit the concrete/core/controllers/blocks/image.php file nothing happens to the image.
even if i delete everything out of there and clear cache
even if i delete everything out of there and clear cache
Try concrete/core/controllers/blocks/image.php
I usually deal with the resizing of images in responsive designs by adding the following to the css:
I wonder if this would work for you
img { max-width: 100%; height: auto; }
I wonder if this would work for you
yep thats what i use but in this case the html height was conflicting for some reason.
function getContentAndGenerate