We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38004
    • 96 Posts
    Hi, I've gotten myself into a muddle trying to output my taglister tags as a dropdown menu.

    <div id="tags">
    
    <form name="myform" action="[[~20]]" method="POST">
     <select name="tagdropdown">
    
    [[!tagLister? &tv=`product_category` &target=`20` &tpl=`tagLister`]]
    </select>
    <div class="form-buttons"><input type="submit" value="submit" /></div>
    
    </form>
    
    </div>


    Here's the tagLister Tpl

    <option value="[[~[[+target]]? &[[+tagVar]]=`[[+tag]]`]]">
    [[+tag]] 
    </option>


    Here is the code on my tag landing page:
    [[!getResourcesTag? &parents=`21,26,29,33,39` &tpl=`product_list` &tagKey=`product_category` &showHidden=`1`  &sortbyTV=`product_price` &sortbyTVType=`integer`  &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]




    The dropdown is showing just fine, but when I select a tag and click go, it take me to the tag landing page, but it just lists everything, instead of only showing me the tag I select as it did earlier before I changed the tags from links to a dropdown.

    Any advice would be appreciated.

    Thanks

      • 19328
      • 433 Posts
      Hi there, don't know if you ever solved this, but for others who are looking for the same thing, this is how I solved it:

      - make the form method GET instead of POST
      - for each option, just set the tag as value, like this:

      <option value="[[+tag]]">
      [[+tag]]
      </option>


      The requestparam will be the name of the select, so in your case it would be 'tagdropdown'.
      (landingpage.com?tagdropdown=tagvalue).