Copied to clipboard

Flag this post as spam?

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


  • vijay 129 posts 152 karma points
    Dec 31, 2009 @ 13:03
    vijay
    0

    How to fill dropdown with node names using xslt?

    How to fill dropdown using xslt?

    ----vijay.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 31, 2009 @ 13:11
    Chris Houston
    0

    Hi Vijay,

    Please try and do some coding yourself before asking for help!

    What are you trying to fill the drop down with?

    Have you actually looked at the examples I suggested you looked at in your previous post? http://our.umbraco.org/forum/developers/extending-umbraco/6167-how-to-use-xslt-in-umbraco

    I assume you know how to write HTML? If not.. you will really need to go back to basics and learn HTML or you will really struggle!

    Have a look at their for-each example which should help you create your drop down list, if you are still stuck, please post the code you have written into this forum thread and I am sure someone ( maybe me if I am still around ) will try and help you :)

    Good luck!

    Cheers,

    Chris

  • vijay 129 posts 152 karma points
    Dec 31, 2009 @ 13:33
    vijay
    0

    hi chris,

    my doubt is if we use user control we  can read node name and id using API and assign to dropdown data text field and data value field properties

    but how to asign these values to dropdown when we are filling dropdown using xslt.

    ----vijay.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 31, 2009 @ 13:43
    Chris Houston
    0

    Vijay... you are making me bang my head on the wall ;-)

    Here is a very simple example of creating a drop down list using XSLT. If you want to use .NET controls you need to create a user control.

    <select name="demo">
    <xsl:for-each select="$currentPage/node">
    <option>
    <xsl:attribute name="value">
    <xsl:value-of select="./@id"/>
    </xsl:attribute>
    <xsl:value-of select="./@nodeName"/>
    </option>
    </xsl:for-each>
    </select>

    Cheers,

    Chris

  • vijay 129 posts 152 karma points
    Jan 02, 2010 @ 06:21
    vijay
    0

    Hi chris,

    First of all thanks for your reply. I am a beginner so i am asking you these type of questions dont take me wrong way.I promise you in few days i am able to learn all the things.

    I wish u a happy new year.

    ---------vijay.

Please Sign in or register to post replies

Write your reply to:

Draft