Copied to clipboard

Flag this post as spam?

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


  • Sam 63 posts 126 karma points
    May 12, 2011 @ 08:54
    Sam
    0

    Need some help with drop down search

    Hi all,

    I have a website structure like this

    Content
        default
            Company Profile
            Products
                Product Item 1
                Product Item 2 etc...
            Brands (hide from navigation) - node ID=1101
                Brand 1
                Brand 2
            Category (hide from navigation) - node ID=1163
                Cat 1
                Cat 2

    I want to create droprowns, place on the default page, to list the nodes under Category and use that in a search which would have another drop down based on the list of Brands Sub node.

    What I have so far is this XSLT which is suppose to create the 2 dropdowns...but they remain blank.any help with this please?

    <xsl:template match="/">
    <form action="../search-results.aspx" method="get">
      
    <div class="prodDropCn">
      

        <select class="dropDown" name="category">
             <option value="any">Select Category</option>
            <xsl:for-each select="umbraco.library:GetXmlNodeById(1163)//node">
               <xsl:sort select="@nodeName" order="ascending" />  
             <option>           
             <xsl:attribute name="value"><xsl:value-of select="./@id"/></xsl:attribute>
               <xsl:value-of select="chooseCategory"/>
             <xsl:value-of select="./@nodeName"/>
            </option>
           </xsl:for-each>
          </select>
    </div>  
            
    <div class="prodDropCn">      
          <select class="dropDown" name="brandname">
            <option value="any">Select Brand Name</option>
           <xsl:for-each select="umbraco.library:GetXmlNodeById(1101)/node">
                   <xsl:sort select="@nodeName" order="ascending" />  
            <option>
             <xsl:attribute name="value">
               <xsl:value-of select="./@id"/>
             </xsl:attribute>
             <xsl:value-of select="./@nodeName"/>
            </option>
           </xsl:for-each>
          </select>
    </div
      
    <div class="buttFind">
         <input type="image" src="images/butt_find.png" alt="Submit button" />
    </div>
      
    </form>
    </xsl:template>

     

    And also how do i create the XSLT for the search function...?

     

    Thks.

    Sam

  • praveity 100 posts 125 karma points
    May 12, 2011 @ 13:17
    praveity
    0

    You could try the XSLTSearch pacakage developed by Douglas Robar.

    http://our.umbraco.org/projects/website-utilities/xsltsearch

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies