Image Block Caption

Permalink
When using the Image block, there is an "Alt Text/Caption" field when choosing the image. Works great for the alt text. Is there a simple way of actually making this a caption as well, as it indicates?

hbartlett
 
hbartlett replied on at Permalink Reply
hbartlett
Never mind, should have searched the forums more thoroughly before posting this. Found the answer sort of here:

http://www.concrete5.org/community/forums/usage/caption-not-showing...

Except I changed the code slightly;

I copied the controller.php from /concrete/blocks/image to blocks/image, found this line:

$img .= "/>";

And added a line right after:

$img .= "<div class=\"caption\">{$this->altText}</div>";

Works a treat.
sschildbach replied on at Permalink Reply
sschildbach
controller.php is now "blank" in C5 version 5.6.3 (so your instructions do not apply) with php code that essentially is saying "drop your additions in here". How would we add a caption with this new controller.php? I tried using 12345J's add-on, but it is not working for me for some reason it does not save the work.