Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig 8 posts 28 karma points
    Aug 22, 2011 @ 04:47
    Craig
    0

    Getting Started

    AValor,

    I uninstalled version 0.1 and installed the latest 0.2 version.

    The Razor script error:
    Error loading Razor Script NivoSlider.cshtml
    'umbraco.MacroEngines.DynamicMedia' does not contain a definition for 'nivoSliderEffect

    Is not occurring anymore. However I've run into a wall here. Not quite sure what to do after the property creation according to your documentation - but your email helped.

    I have a created a new Media Type called "NivoSliderImage" and it has all these properties:

    It's after this that I'm not quite sure where things should go. Next I created a new folder with a Doc type of "NivoSliderImage" in the Media library named "nivoFolder".

    I've added new images, effects and captions here and then I'm trying to reference those from my home page template by inserting the NivoSlider Macro:

    Right now I'm not seeing any content - images or captions show up on the homepage. I've also tried to just reference from the homepage Content section by adding the NivoSlider Macro in the editor. I think I was going in the right direction but missing something basic. Thanks for any feedback.

    Craig

  • AValor 32 posts 56 karma points
    Aug 22, 2011 @ 09:04
    AValor
    0

    Hi Craig!

    Your problem here is that you have created a NivoSliderImage node and added Image nodes. Consider NivoSliderImage as an slice, which has the properties needed for every slice in the slider. So, try creating a Folder node in your media library and then add some NivoSliderImage nodes to it. Here you have an example:

    (Also note the possible values for the Effect property. These are extracted from the NivoSlider documentation)

    Try this and let me know. Meanwhile, I will be extending the documentation in order to include an Usage section.

  • Craig 8 posts 28 karma points
    Aug 22, 2011 @ 16:09
    Craig
    0

    AValor,

    OK, this is making sense to me now. Thanks for clarifying the structure on the NivoSliderImage. It's working now!

    Just a couple of issues I see happening here for me:

    •  When the "nivoManualAdvance" is set to 1 - the effects work correctly. When it's set to 0 (to have it cycle through on it's own) it doesn't pay attention to the "nivoPauseTime" at all. It just cycles through as quickly as possible, it does not pause at all.
    • IE browsers - the Nav and Caption will not display. I was reading about a fix for this: https://github.com/gilbitron/Nivo-Slider/issues/31 - stating this:

      Check the scripts used in the html code for the following:

      $(window).load(function() {
      $('#slider').nivoSlider({
      effect:'fold', //Specify sets like: 'fold,fade,sliceDown'

      });
      });

      Right after fold you see the ,

      Remove it so your code looks like:

      $(window).load(function() {
      $('#slider').nivoSlider({
      effect:'fold' //Specify sets like: 'fold,fade,sliceDown'

      });
      });

    Any idea why these might be happening? Thanks again for all your help.

    Craig

  • AValor 32 posts 56 karma points
    Aug 23, 2011 @ 09:38
    AValor
    0

    Alright...  I have uploaded a brand new 0.3 version, fixing a problem obtaining parameter values (copy-paste curse!). Try this one and you should get rid of the nivoManualAdvance problem.

    By the way, I forgot to say in the documentation that is required to add a reference to the nivo-slider.css styles file in head section.

    <link rel="stylesheet" href="css/nivo-slider.css" />

    Could this have anything to do with your second problem? Please let me know!

  • Craig 8 posts 28 karma points
    Aug 23, 2011 @ 15:12
    Craig
    0

    New version has fixed the nivoManualAdvance problem!

    However the problem persists with IE, only images will display and nothing else. I already had the reference to the stylesheet in the head section so that's not the problem. My previous static version worked and displayed correctly in IE with no trouble. Not sure what's going on, have you been able to test in IE?

    Many thanks again for your help with this.

  • Craig 8 posts 28 karma points
    Aug 25, 2011 @ 17:07
    Craig
    0

    AValor, just FYI. Finally got it to work in IE! Turns out the last parameter (,) comma just need to be omitted in the $(window).load(function()

    Thanks again

  • AValor 32 posts 56 karma points
    Aug 26, 2011 @ 08:29
    AValor
    0

    I'm glad to hear you find the problem! Sorry I can not answer you back before, since I've been on a business travel.

    I have been able to reproduce the bug using the  "Internet Explorer 7" browser mode. It appears that the error does not occur when working with IE8 or above.

    Now I have a reason to throw a new version!

    Thank you again for your effort in impoving this package!

  • Craig 8 posts 28 karma points
    Aug 27, 2011 @ 21:10
    Craig
    0

    Absolutely, thank you - it's saved me a ton of time on my current project.

    One future request: The ability to position "slides" to move up/down or just allocate which Slide displays first.

  • AValor 32 posts 56 karma points
    Aug 29, 2011 @ 11:17
    AValor
    0

    Hi Craig!

    You can use the parameter nivoStartSlide for setting the first slide.

  • Craig 8 posts 28 karma points
    Aug 29, 2011 @ 17:30
    Craig
    0

    AValor - yes, I've been trying that with no luck.

    I've added a property type of "nivoStartSlide" to the Nivo Media Type and tried types - true/false, testString, numeric. Is there something in the NivoSlider.cshtml script file they may need to be adjusted?

     

    thanks again,

    Craig

  • AValor 32 posts 56 karma points
    Aug 30, 2011 @ 09:58
    AValor
    0

    Ahm... I think you're misunderstood here...

    You don't have to create a property type in the Media Type.

    You need to declare the parameter in your call to the macro... like this:

    <umbraco:Macro nivoFolder="1263" nivoAnimSpeed="700" Alias="nivoSlider" runat="server" nivoPauseOnHover="1" nivoStartSlide="3"></umbraco:Macro>

    Try it and let me know your results.

     

  • Craig 8 posts 28 karma points
    Aug 30, 2011 @ 18:25
    Craig
    0

    Yes, that works. I was just trying to see if it could be controlled dynamically through the media type - could be a nice feature to be able to change the starting slide through the media type.

     

    thanks again for all your help - very much appreciated.

  • AValor 32 posts 56 karma points
    Sep 01, 2011 @ 09:26
    AValor
    0

    Craig,

     

    Remember that the SliderImage is the media type defined for storing a slide and only constains the property needed to render the HTML properly (a, img and div captions...). The macro parameters are used to set the behavior of the nivoSlider, when you call it in the javascript function (properties as animation speed, effects, navigation options...).

    Certainly, you could add a boolean property to the media type to set that slide as the first one and change the macro implementation to search through the child nodes the first one that has that property set to true...

    This aproximation would be useful if you want to let an editor user to change the initial slide in the Media Section, instead of modifying the template... is this your case?

  • Craig 8 posts 28 karma points
    Sep 01, 2011 @ 22:59
    Craig
    0

    That's it - no big deal. I can easily adjust the other way.

    The last thing (I promise) I'm trying to do is have the ability to select an outside URL in addition to the internal pages. If that's an easy change, great - if not no worries.

    thanks,

    Craig

  • AValor 32 posts 56 karma points
    Sep 02, 2011 @ 08:34
    AValor
    0

    OK, I'll think about that this weekend.

  • Jason 86 posts 156 karma points
    May 01, 2014 @ 15:48
    Jason
    0

    Hello!

    I hope I can still post to this thread even though it's outdated.

    I installed the NivoSlider plugin to 4.5.2 and am getting an error. (yes, it's super old, but built for us by a third party few years back).

    The error is as such:  "Error loading DLR script (file: NivoSlider.cshtml)"

    I've been working on this all morning and trying to find the solution but have not had any luck.

    I need to get this up and running as quickly as possible so if anyone could assist, I would greatly appreciate it!

    Please let me know if you need additional info.

Please Sign in or register to post replies

Write your reply to:

Draft