Copied to clipboard

Flag this post as spam?

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


  • Kim Emil Vesterbirk 13 posts 34 karma points
    May 17, 2011 @ 15:07
    Kim Emil Vesterbirk
    0

    Radiobutton List with Images - how to get image

    First of all: uComponents rock!

    Secondly: I need help :)

    Im using the Radiobutton List with Images to have my customer being able to choose one of many pictures to be shown as an overlay image in an image rotator.

    But how do i actually render the image the customer chooses? Is there an ID as with GetMedia or how does it actually work? I can easily output the associated text, but what I really need is the image.

    Same issue with the Image Dropdown.

  • Ronnie Hegelund 48 posts 710 karma points
    May 17, 2011 @ 15:16
    Ronnie Hegelund
    0

    Try using the split function widt a '|' or a ','

    example:

    <ul>
        <xsl:for-each select="umbraco.library:Split($currentPage/* [name() = 'languages' and not(@isDoc)], '|')/*">
          <li>
            <xsl:value-of select="."/>
          </li>
        </xsl:for-each>
      </ul>

    /ronnie

  • Rich Green 2246 posts 4008 karma points
    May 17, 2011 @ 15:26
    Rich Green
    0

    Have a look at the umbraco.config file (it's just XML) in your App_Data folder, search for the name of your property and have a look at how the data is held, you should then be able to figure it out, if not post the XML back here.

    Rich

  • Kim Emil Vesterbirk 13 posts 34 karma points
    May 17, 2011 @ 15:37
    Kim Emil Vesterbirk
    0

    Hi Rich

    Thanks for pushing me in the right direction. I found the property but it seems its of no use for my purpose.

     <overlayGrafik><![CDATA[Blå - bølge]]></overlayGrafik>

    No ID, no path to the file. I can however rightclick on the image in the backend and get a path for it there.

    <img src="/umbraco/plugins/uComponents/MultiImageUploadPrevalues/1113/bluewave.png">

    But it's not really presenting the dynamicness I'd like.. :)

  • Rich Green 2246 posts 4008 karma points
    May 17, 2011 @ 15:39
    Rich Green
    0

    Hi,

    I'm not sure you're using the right tool for the job, I think this is a way to visually pick a value, not select an image.

    You might be better off using the uComponents Multi Tree Picker, and then you can set the images you need to find with the start node and set the maximum images to 1.

    Then you can use GetMedia to get the image.

    Rich

  • Kim Emil Vesterbirk 13 posts 34 karma points
    May 17, 2011 @ 15:52
    Kim Emil Vesterbirk
    0

    Hreeelooo :)

    Yup, exactly my thoughts too. I was trying out the two datatypes (Dropdown and Radiobutton) because it seemed like a nice visual way for selecting a limited number of images not administrated by the customer. But good alternatives is almost as good as the real deal....almost :D

    Thanks Rich :)

    /Kim Emil

Please Sign in or register to post replies

Write your reply to:

Draft