My client requested a modification to their slider that will enable two captions. I'm using the Views Nivo Slider module and believe I can accomplish what I want by modifying the module"s code and extending the Nivo js file. But because I am still learning Drupal, I'm not very familiar with the details of how modules work with JavaScript libraries.

I have gathered that in order to extend a Drupal Module it needs to expose hooks. But it doesn't look like this module does that, so I assume that I'll create a custom module with this modules code as the basis. I know hacking up an existing module code is not the "Drupal way", and I won't if there is another way. Is there?

Also, if I wanted to add another function to an existing library like this one, is there a method through the Drupal module framework to extend the js file without messing with the libray code?

Edit Title changed to be more general.

I've tried the suggestion by @James Kirby and the field doesn't appear to be included in the markup when I inspect with firebug. Curious, how does the field get included to the slideshow output in your implementation if the fields are normally assigned through the "Views Nivo Slider" format settings? It doesn't look like I can assign divs or classes to the field through it's settings.

Here is what I am trying to achieve if possible. Example

Should I be researching my original approach?

1 Answer 1


i usually do this by adding fields to the sliders content type, then displaying them out through views then use css to position the text over the images


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.