Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am desperately trying to get captions working on my slideshow.. I have tried everything I can think of to rewrite the output to include the "flex-caption" class but can't seem to get there..
I simply have a "Slide" content type with a "Title" field and an image.. I want the title to be the caption on the image in the slideshow view block..
Please can someone give me some pointers of how to get there?
Thanks
Comments
Comment #1
pascalli CreditAttribution: pascalli commentedAre you still stuck?
1. Make sure your view contains your image field first and then your title field. Otherwise you won't be able to rewrite the output.
2. hide your title field in your view.
3. override .flex-caption css class sample snippet::
.flex-caption{
display:block;
position:relative;
bottom: 50px;
background:url("../images/bg-popups.png") repeat scroll transparent;
border-radius: 0.5em;
padding: 0.5em;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 1px 2px rgba(0, 0, 0, 0.29);
color: #d7ceb2;
text-shadow: 3px 3px 0px #2c2e38, 5px 5px 0px #5c5f72;
letter-spacing: 1px;
text-align:center;
}
3. rewrite your output: with something like [field_image_projet][title]
4; Hope it will help :-)
Cheers.
Comment #2
wipeout_dude CreditAttribution: wipeout_dude commentedThanks.. I will give that a crack.. :)
Comment #3
minorOffense CreditAttribution: minorOffense commentedCaption support has been improved. Check the latest dev once it is published. You just need to have a field with the class flex-caption in your row result n