Copied to clipboard

Flag this post as spam?

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


  • Hidde kiekens 4 posts 24 karma points
    May 20, 2010 @ 15:41
    Hidde kiekens
    0

    An image slideshow with next/prev buttons, how?

    Hi everyone,

    i'm trying to find out how i should create an image slideshow with prev/next buttons. The images will be available from a media folder(the folder itself will be selected). What i'm trying to accomplish is pretty much like the lightbox, allthough the images should not come in a 'close up'.

    So my actual question would be if it's possible to do this almost all in an xslt and what specific functions i should look into for doing that... My knowledge of xslt is pretty basic atm, but could allways be expanded if someone could guide me into the right direction.

    Thank you in advace and kind regards,

    Hidde Kiekens

  • Ralph van Vugt 57 posts 101 karma points
    May 20, 2010 @ 16:02
    Ralph van Vugt
    0

    Hi Hidde,

    Take a look over here. 

    This XSLT will put all the images from a selected mediafolder in an unordered list. For the slider-part you can use almost any jQuery slider.

    Succes!

    Ralph

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    May 20, 2010 @ 16:53
    Sebastiaan Janssen
    0

    As with all of these things, I usually create a working sample in just plain HTML and then I can quickly identify which parts of the HTML (& javascript) will need to be made dynamic. Those I can quite easily replace by bits of XSLT. It's not to difficult to put an xsl:for-each loop in there somewhere and iterate over the images that you get from Ralph's link above.

  • Hidde kiekens 4 posts 24 karma points
    May 20, 2010 @ 16:54
    Hidde kiekens
    0

    Thank you very much Ralph,

    I've looked at it and it looks indeed partially like what i need.

    I installed it and got an error on installing, but 'Lee' told this was normal. Now i added the macro to the template and edited some stuff so it works with the field i fill in the content. like this: 

    <umbraco:Macro MediaFolderID=<umbraco:Item field="mediaFolder" runat="server"></umbraco:Item> ListClass="imagesClass" ListID="imagesID" Alias="[LM]LoopMediaFolderImages" runat="server"></umbraco:Macro>

    Now when i try to do this i get the same error i got on installing when opening the page on which i tried it. 

    It's a simple runtime error though, and it has no stacktrace :s are you familiar with what i'm experiencing? or do you see some troubles whit the way i implemented the macro ?

    regards,

    Hidde

  • Hidde kiekens 4 posts 24 karma points
    May 20, 2010 @ 17:04
    Hidde kiekens
    0

    The next image should make a little bit more clear about what i'd like to accomplish. 

    Uploaded with ImageShack.us

    The Description underneath is an extra propertie i created for images within their datatype. The Prev/Next are pretty obvious about wat they do.  When i proceed with next i should get the next picture in the folder and it's belonging description.

  • dandrayne 1138 posts 2262 karma points
    May 20, 2010 @ 17:36
    dandrayne
    0

    You could start with this and modify ->  http://our.umbraco.org/projects/jqgallery </plug>

  • Ralph van Vugt 57 posts 101 karma points
    May 21, 2010 @ 08:49
    Ralph van Vugt
    0

    Standard, the macro asks for the source when you add it to the template. When you want to select the mediafolder using a pageItem, you have adjust the macro a bit:

    <umbraco:Macro imageFolder="[#YourMediaPickerAlias]" Alias="[LM]LoopMediaFolderImages" runat="server"></umbraco:Macro>

    This will generate a list of images from the selected folder in the mediasection.

    For the slider, have a look at http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider by example. This will convert the list of images to a slider using jQuery.

  • Ralph van Vugt 57 posts 101 karma points
    May 21, 2010 @ 08:50
    Ralph van Vugt
    0

    Sorry, forgot the code tags:

    <umbraco:Macro imageFolder="[#YourMediaPickerAlias]" Alias="[LM]LoopMediaFolderImages" runat="server"></umbraco:Macro>
  • Hidde kiekens 4 posts 24 karma points
    May 21, 2010 @ 09:08
    Hidde kiekens
    0

    Thanks to all for the marvelous replies... I now know what to do :D

    Thank you very mich and kind regards,

    Hidde

  • David 1 post 21 karma points
    May 21, 2010 @ 10:49
    David
    0

    Magic Slideshow has forward and back buttons. You can use a simple .NET script to fetch the images from your folder. If you give a URL of your site, I'll point you in the right direction.

Please Sign in or register to post replies

Write your reply to:

Draft