Hi, I was wondering how i could style the Nivo Slider. I did several google searches, and the main site with the documentation seems to be under maintenance. I tried to just drag and drop the new folder with the style I made into sites/all/modules/views_nivo_slider/styles but its not picking it up in Views. Any tips or tricks to make it work without overwriting the original "default" style?

Thanks for the help ahead of time.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xlyz’s picture

styles are hardcoded. see views_nivo_slider_style_plugin.inc

you can workaround it:

  1. add a new option for the new style
  2. put your new style in the styles folder in the view nivo slider module folder (or patch the module to allow picking styles from other folders as well)

being a quite ugly workaround (especially the second step), I'm changing this issue in a feature request :)

xlyz’s picture

Title: Styles in NivoSlider » Allow custom styles in NivoSlider
Component: Documentation » User interface
Category: support » feature
Priority: Normal » Major
FileSize
1.32 KB

attached patch take care of step #2 in the above comment.

xlyz’s picture

Status: Active » Needs review
FileSize
3.21 KB

Complete patch:

  1. It add an hook to add a new style:
     * Hook to register a Nivo Slider style.
     *
     * your root css file inside your style folder shall be named
     * custom-nivo-slider.css
     */
    function hook_views_nivo_slider_styles() {
      return array(
        'path/to/your_style_directory' => t('Style name'),
      );
    }
    
  2. Allow putting your style folder wherever you want (that means it includes the patch at #2)

enjoy

ckng’s picture

Priority: Major » Normal
Status: Needs review » Needs work

Your patch in comment #3 is not available on d.o, naming problem I believe.

ckng’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev

Default themes/styles from Nivo Slider is now available in the 7.x-3.x branch.
For custom theme, could select None for the style and you can theme it via .theme-none

But still would like to have #3 patch to go in to support other folders such as theme.

xlyz’s picture

here it is. there is room for improvement :)

xlyz’s picture

ckng’s picture

Make sure you are patching against 7.x-3.x branch, you are working on old branch.

xlyz’s picture

need more time for that :)