Crop Images in Slideshow...

Permalink
How can set the width and height of the the slideshow so that the images don't keep changing size. I want to have the slideshow at 540px wide x 400px high and have it so that the image fills all that space, even if some of it is cropped off. Can anybody help? Thanks

Cyberdave
 
jordanlev replied on at Permalink Reply
jordanlev
There is no built-in functionality to crop images in concrete5.

I think you could set their size via css, although if they aren't all the same proportions to begin with then they will get skewed. Add this to your theme's css file:
.ccm-SlideshowBlock-display {
    width: 540px;
    height: 400px;
}

(I haven't tested this so I'm not sure if it works).

If you're willing/able to get your hands dirty with some php code, I created an image helper that will do cropping (seehttp://www.concrete5.org/index.php?cID=70847#89293... ). To make this work you'd have to override the slideshow block's controller and generate thumbnails from the images.

-Jordan
mexicanred replied on at Permalink Reply
mexicanred
Hello, I am sure you have solved this but just incase someone is searching for a solution in the dark and distant future, here is my workaround.
I duplicated the slideshow directory from the core blocks to my root blocks dir.
Then I removed all except the view.css file (in my ROOT blocks/slideshow/ directory not the core one!!!!!)
There are just 2 classes there:
.ccm-SlideshowBlock-display and
.ccm-SlideshowBlock-display .slideImgWrap

On the second one I set the width and height I needed the images to crop to, and added overflow:hidden;
And apart from tweeking the positioning and adding some margins so it would sit right in my custom theme that seems to have done it!

Cheers
Allison