Hello

Then you have a slideshow where each picture should have a text overlay you only get the text overlay in the last picture in the slideshow.

So if you have a slideshow with picture 1 with text AAA and picture 2 with text BBB and sort order 1 first you will get:
Picture 1 without overlay and then picture 2 with text overlay BBBB

IF you change sort order to 2 first you get:
Picture 2 without overlay and then picture 1 with text overlay AAA

This is tested in Firefox 3.6 and 4.0. If you instead try it in Chrome you wont get any overlay at all!
Using Views 3.0 Beta 3

Regards
Oscar

Comments

ideogram_nl’s picture

Hi,

I noticed the same behaviour. It's caused because the HTML simply isn't there. There should have been two div's with captions, and there is only one.

brenes’s picture

Experiencing the same behaviour with views 7.x-3.0-beta3. The caption only shows in the last slide. Any Idea how to solve this issue?

SanFeda’s picture

"The caption only shows in the last slide."

Same with me

Zsuffa Dávid’s picture

Change in file views_nivo_slider.module lines around ~166:
from:

  $params = array(
    'style_name' => $presetname,
    'path' => $image_url,
    'title' => $title_id,
    'attributes' => $attributes,
  )
to:
  $params = array(
    'style_name' => $presetname,
    'path' => $image_url,
    'title' => $title,
    'attributes' => $attributes,
  )

$title_id -> $title solved the issue for me.
This works only with txt captions not the html version.
This way nivo_slider use the img title attribute instead of the nivo-html-caption div.

I think the problem is with the $view->_vns_captions array which is overridden always with the last title value.
Around line 132 in the .module file:

      if ($title) {
        $view->_vns_captions[$title_id] = $title;
        $title_id = '#'.$title_id;
      }
      break;
ckng’s picture

Title: Cant get text overlay to work » Missing captions
StatusFileSize
new1.81 KB

This is due to $view->_vns_captions not retained across field rendering.

Attached is a patch using $view->result to achieve the intended output.

ckng’s picture

Status: Active » Needs review
ckng’s picture

StatusFileSize
new1.2 KB

Just realized there is an easier way.

ckng’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

SpiffBB’s picture

Can also confirm that the latest dev version from august 4:e is working as it should. Great work!