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.
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
Comment #1
pedrofaria CreditAttribution: pedrofaria commentedHi koffer,
You can do it using the rewrite output field settings.
cya
Comment #2
bjorn2404 CreditAttribution: bjorn2404 commentedCan 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.
Comment #3
bjorn2404 CreditAttribution: bjorn2404 commentedNevermind, I was forgetting to set the new field in the Row Style after creating it in sliderfields.inc
Comment #4
pedrofaria CreditAttribution: pedrofaria commentedYou 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
Comment #5
crosby86 CreditAttribution: crosby86 commentedI 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.Comment #6
waltf CreditAttribution: waltf commentedSame here. Trying to get the caption formatted, but no succes yet.
Subscribed.
Comment #7
waltf CreditAttribution: waltf commentedfound 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.
Comment #8
crosby86 CreditAttribution: crosby86 commentedperfect! thanks a ton dude
Comment #9
cmsproducer CreditAttribution: cmsproducer commentedDeveloper, 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
Comment #10
Technikal CreditAttribution: Technikal commentedthanks for the insight waltf.
Comment #11
yngens CreditAttribution: yngens commentedI 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.
Comment #12
sunshinee CreditAttribution: sunshinee commented+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.
Comment #13
sunshinee CreditAttribution: sunshinee commentedupdating title...
Comment #14
bryancasler CreditAttribution: bryancasler commentedI agree, I would love an option for this.
Comment #15
sohail.alee CreditAttribution: sohail.alee commentedthankyou so much bro. i was getting mad bcz of this issue. it is fixed now. :)