image class
Permalink
Hi,
when adding an image to a page, is it possible to have a 'class' field for the image.
Regards,
Warren
when adding an image to a page, is it possible to have a 'class' field for the image.
Regards,
Warren
I think we will attempt to use this solution
http://www.concrete5.org/community/forums/usage/image-in-content-bl...
http://www.concrete5.org/community/forums/usage/image-in-content-bl...
What I said in short. ;)
Hi
It's actually very easy to extend the "Image" block with additional fields.
I've done that already, just download the attached archive and unzip it into your "/blocks" folder on the root of your website.
The extension adds another field "classes" to the btContentImage table, to add this new field go to "dashboard" -> "block types" and click on "Image" then "Refresh". Now the database field is added.
You also need to clear the cache to make sure Concrete5 uses the new version of the Image block now so go to "dashboard" -> "system & settings" -> "clear cache" to do that.
Now when you add/edit a block of type "Image" you get an additional input field named "Classes" where you can add one or more classes separated by a space.
Hope it works :-)
It's actually very easy to extend the "Image" block with additional fields.
I've done that already, just download the attached archive and unzip it into your "/blocks" folder on the root of your website.
The extension adds another field "classes" to the btContentImage table, to add this new field go to "dashboard" -> "block types" and click on "Image" then "Refresh". Now the database field is added.
You also need to clear the cache to make sure Concrete5 uses the new version of the Image block now so go to "dashboard" -> "system & settings" -> "clear cache" to do that.
Now when you add/edit a block of type "Image" you get an additional input field named "Classes" where you can add one or more classes separated by a space.
Hope it works :-)
Hi nerdess,
Thanks for this, I had exactly the same issue and your solution worked a treat.
kind regards
Thanks for this, I had exactly the same issue and your solution worked a treat.
kind regards
You could use the Content block and add the image with classes though.