Tips for using Nivo Slider on a page

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
6/7/2014 6:59:31 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Tips for using Nivo Slider on a page

I've just been playing with Nivo slider for the first time, trying to get a slideshow onto a page (not in the header). At first I tried using the Image Gallery feature as described here, however I found no way of altering the slider settings using this method (and I don't want the defaults). After a bit of trial and error, I've found a simple way of getting a self-contained Nivo Slider onto a page without altering the layout.master (i.e. without loading the javascript on all pages, and without enforcing the same Nivo settings on every instance). Here it is in case it is useful to anyone.

1. Assuming you are using a recent mojoPortal, add a Custom JavaScript feature to the page. In the raw script, add this:

Make the sure the option to "Add Script Element Around Raw Script?" is unchecked. I don't think it matters where to position the script, but I've not tested this.

If you are not using a recent mojoPortal and so don't have the Custom JavaScript feature, I also found that this javascript works fine if just added to the same HTML Content feature as the HTML below.

2. Add the following into your skin's style.config if not already present:

none

3. Add the HTML for the images to the page, along these lines:



piccie 1
piccie 2
piccie 3
...etc etc etc...
  

   

 

6/7/2014 7:18:43 AM
Gravatar
Total Posts 18409

Re: Tips for using Nivo Slider on a page

The nivo settings in the image gallery can easily be changed from theme.skin. See Image Gallery Display Settings. Specifically, the NivoConfig setting is where you put any nivo settings that would be inside the {} that you wired up manually. But leave out the brackets {} since they are already provided and leave out the javascript comments.

6/14/2014 3:35:33 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Tips for using Nivo Slider on a page

Thanks Joe that's useful to know.

It would be good to include a mention of that on the page where it talks about Nivo support in the Image Gallery: https://www.mojoportal.com/using-nivo-slider

You must sign in to post in the forums. This thread is closed to new posts.