Because FlexSlider (and other Views Slideshow integrations) only allows one field as a "Caption field", I regularly will add multiple fields to the view but hide them from display. Then I'll use a single "Global: Custom text" field to combine them all into a single field. The global text field usually has text like this:

<h2>[title]</h2>
[field_body]
[field_related_links]

This makes it so that I can have any combination of fields I like as a caption.

Unfortunately this doesn't work with Flexslider Views Slideshow, because it *forces* the custom text to have a wrapper of a P tag. This apparently breaks the custom text area.

I'm not sure why a P tag would be a reasonable choice to begin with. Even in flexslider-container.tpl.php, a Div is used. For both consistency and to restore the ability to use custom text fields in Views Slideshow, the aggressiveness of Flexslider's Views integration should be lessened.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Active » Needs review

Here's a patch that should apply to both 1.x and 2.x branches. It simply switches the views integration to using the field and label wrapper instead of the field wrapper. It also allows users to include the field label if they really want to. I appreciated how Flexslider was trying to help me by making it "look right" by default, but the aggressive overriding was preventing needed functionality.

HTML Before:

<li class="flexslider-views-slideshow-main-frame-row flexslider_views_slideshow_slide views-row-1 views-row-odd" style="width: 100%; float: left; margin-right: -100%; position: relative; display: none; ">
  <div><div><img src="example.jpg" alt=""></div></div>  
  <p class="flex-caption"></p>
    <h2 class="slide-title">Slide titel</h2>
    <p>Caption text</p>
  <p></p>
</li>

HTML After:

<li class="flexslider-views-slideshow-main-frame-row flexslider_views_slideshow_slide views-row-1 views-row-odd" style="width: 100%; float: left; margin-right: -100%; position: relative; display: none; ">
  <div><div><img src="example.jpg" alt=""></div></div>  
  <div class="flex-caption">
    <h2 class="slide-title">Slide titel</h2>
    <p>Caption text</p>
  </div>
</li>
quicksketch’s picture

Status: Needs review » Needs work

The last submitted patch, flexslider_views_slideshow-1823566.patch, failed testing.

minorOffense’s picture

Version: 7.x-1.0-rc3 » 7.x-2.x-dev
Status: Needs work » Needs review
minorOffense’s picture

This should be fixed in the new dev release once it's published.

minorOffense’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.