Cutlines

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Jun 05, 2015 4:07 pm
Reply with quote
Report this post
Having a problem with cutlines for images placed within a story.

Cutlines are working great for images placed using the "images and links" tab (using JCE editor) also (I did update template with code to make cutlines show), however for images placed within a story the cutlines are not showing. The information is there when I hover over the image, but not showing like the primary image.

Thanks,
jkvt
User avatar
Junior Boarder

teitbite
Sun Jun 07, 2015 5:48 pm
Reply with quote
Report this post
HI

I'm afraid I do not understand. Can You please show me some examples ? One where it works ok and other where You need it to work the same.
User avatar
Moderator

GK User
Mon Jun 08, 2015 5:34 pm
Reply with quote
Report this post
The cutline works for the intro and full article image, but when I place an image mid-story no cutline is shown.

Ex.: http://inthevalley.powershifthosting.co ... h-birthday

The top image has a cutline, the image mid-story it does not show up.
User avatar
Junior Boarder

teitbite
Thu Jun 11, 2015 12:30 pm
Reply with quote
Report this post
Hi

I think this should be handled by a plugin, but there is a simple way to do that. Try add this to /layout/block/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.articleBody img').each(function(){
if( $(this).attr('alt') !== 'undefined' ){
$(this).after('<p class="img_caption">'+$(this).attr('alt')+'</p>');
}
});
});})(jQuery)</script>
User avatar
Moderator


cron