I really like this module!! but there is one thing i dont like, only show one line (title) in caption, any way to show more information? like title, teaser and link to node?

Comments

pedrofaria’s picture

Hi koffer,

You can do it using the rewrite output field settings.

cya

bjorn2404’s picture

Can you elaborate a little more on this pedrofaria? I've used nivo with other CMSs and always use the image alt to add an article preview. I'm trying to do the same with Drupal but can't seem to pull the data from the database. I tried adding a new plain textarea field and also tried getting it from the node body. I see how the image is defined at the bottom of views_nivo_slider.module and tried adding another case to the switch statement but I'm not having any luck.

bjorn2404’s picture

Nevermind, I was forgetting to set the new field in the Row Style after creating it in sliderfields.inc

pedrofaria’s picture

Assigned: Unassigned » pedrofaria
Status: Active » Needs review

You don't need modify any code...

At views interface, at your field selected as caption, there is a option to rewrite the output... it's a views feature and not views nivo slider particularity.

thanks,

pedro

crosby86’s picture

I am trying to do this method, and cannot get anything to show up. If i try to add an image to my caption, i only get "/default/files/image.jpg" no image will show up. If i try to add <div class="modifiedtitle"> [title] </div> no formatting will show up. The title will be displayed as normal text. If i try to add <br> tags there is no separation between lines. any help would be greatly appreciated.

waltf’s picture

Same here. Trying to get the caption formatted, but no succes yet.
Subscribed.

waltf’s picture

found a solution to get the caption formatted, so eg brake will work.

in views_nivo_slider.module
change line 95 from
$view->field[$options['title_field']]->options['alter']['strip_tags'] = 1;
to $view->field[$options['title_field']]->options['alter']['strip_tags'] = 0;

hope that helps.

crosby86’s picture

perfect! thanks a ton dude

cmsproducer’s picture

Component: Miscellaneous » Code
Status: Needs review » Active

Developer, could you please remove the stripping of tags from the module code, and either make it a configurable setting or let the choice be made in Views? Although we can simply change the line as explained above, that would imply/require that we have to maintain this as a custom module just because of one character....
Thanks in advance

Technikal’s picture

thanks for the insight waltf.

yngens’s picture

I second a request to make caption formatable.

Another important issue for my project is to be limited with only three configurable fields: Image, Title, Link. Would be even better if admin of a Drupal installation himself was able to define how many fields he needs.

sunshinee’s picture

+1 for not stripping HTML by default. Since Views already includes the option to strip tags, it should be up to the user to either strip tags or ensure they are closed correctly.

sunshinee’s picture

Title: More cck fields in caption? » Don't strip HTML output by default

updating title...

bryancasler’s picture

I agree, I would love an option for this.

sohail.alee’s picture

thankyou so much bro. i was getting mad bcz of this issue. it is fixed now. :)