We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15003
    • 85 Posts
    Unfortunately you’re talking above my current skill set.

    I have one container:
    Products (1)
    ---Product1
    ---Product2
    ---Product3

    I’m using a product-cat TV that is associated with the products subpages.

    Ultimately I would like to use a drop down menu for users to select a category from. It looked to me like the tagging idea was set up to output to links. Am I wrong?

    Is there some way to use http://wiki.modxcms.com/index.php/Dropdown_Menu_with_Ditto

    Sorry to not be up to speed, I’m workin’ on it wink
    Jules
      • 15003
      • 85 Posts
      I don’t know if this is what your were trying to explain to me, but I did find a way to get it to work.
      For those that are curious here’s what I ended up doing:

      Created the tv product-tags
      Input Type: Check Box
      Input Option Values: tag1||tag2||tag3
      Widget: Delimited List
      Delimiter: ||
      gave access to the template used by the Products(4) page.

      Created a container within my Poroducts(4) container and named it Tags(26) but used a URL alias of "section" so that my URL would end up looking like: mysite.com/products/section/tag1

      On the products page I included
      {{tag-menu}}         
      
      [[Ditto? &parents=`4` &tpl=`product-template` &filter=`id,24,2|id,25,2|id,26,2` &display=`9` &paginate=`1` &paginateAlwaysShowLinks=`0` &tagData=`product-tags` &tagDelimiter=`||` &tagDocumentID=`26`]]   
      
      <div id="page-nav">[+previous+] [+pages+] [+next+]</div>

      tag-menu chunk:
      <div>
          <form action="#" onsubmit="return false" method="post">
              <select name="goto" onChange="jumpTo(this);">
              <option value="please choose one">Please choose one</option>                        
              [!Ditto? &parents=`26` &tpl=`tag-menu-option` &tagData=`product-tags` &sortBy=`tags` &sortDir=`ASC`!]
              </select>
          </form>
      </div>

      tag-menu-option chunk:
      <option value="[~[+id+]~]">[+pagetitle+]</option>

      javascript to make jump menu work - from http://wiki.modxcms.com/index.php/Dropdown_Menu_with_Ditto
      <script type="text/javascript">
      function jumpTo(selObj){
      thevalue = selObj.options[selObj.selectedIndex].value;
      if (thevalue != 0) window.location= thevalue;
      return false
      }
      </script>

      I didn’t use a call on Tags(26) - I just made it a container and created a page for each tag term I wanted to use within it. On each of these pages I included another jump menu and the call below. For each page I updated the &tagDocumentID and &tags perameters accordingly
      [!Ditto? &parents=`4` &tpl=`product-template` &display=`9` &paginate=`1` &paginateAlwaysShowLinks=`0` &tagData=`product-tags` &tagDelimiter=`||`  &tagSort=`0` &tagDocumentID=`27` &tagMode=`onlyTags` &tags=`tag1` !] 

      I really struggled with the idea of having to create a page for each tag term within a container. I guess that just shows my inexperience, but it took me a bit to wrap my mind around it all. I thought for sure that there would be a way to include some sort of conditional coding so that I would only need the Tags(26)page.

      At this point I haven’t applied any css styling but it does wk if you want to look: http://www.massagecenters.webbdemo.com/products

      Cheers!
      Jules
        • 20413
        • 2,877 Posts
        I’d only use Quill if I wanted the editor to be able to create and delete categories
        as simple as dealing with resources (as it would be).

        Nice you got it working. Now apply ditto request extender and you can sort by links
        and urls. Example: http://4up2date.info/blog.html?ditto_bc_sortBy=pagetitle&ditto_bc_sortDir=DESC
        where _bc_ is &id=`bc`
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 15003
          • 85 Posts
          I don’t quite understand the extender thing. Is this something that needs to be included in the call or just added to a url link? Or is it a addon like Distinct (Ditto Extender)- http://modxcms.com/extras/package/95

          Appreciate the clarification.

          Jules
            • 15003
            • 85 Posts
            I was doing some cross browser testing and I found a flaw in how the page works in IE.

            If you go to the products page and select an item from the "sort products" jump menu it takes you there with the url
            http://www.massagecenters.webbdemo.com/products/section/cool-therapy

            If you select another item from the "sort products" jump menu it works in safari, firefox and chrome, but in IE I get a url like this:
            http://www.massagecenters.webbdemo.com/products/section/products/section/heat-therapy which of course redirects me to my 404 error page.

            I thought I could resolve this by moving my section container out from under products, but this did not work I still got:
            http://www.massagecenters.webbdemo.com/section/section/heat-therapy

            so I guess this is an issue with the Jump menu. Any ideas on how to deal with this?

            Jules
              • 16278
              • 928 Posts
              Did you sort out your question about extenders? If not, you may find http://www.pogwatch.com/ditto/ditto-extenders.html helpful.

              Re the jump links, try adding a slash at the beginning, so they read /products/etc. rather than product/etc.. That should make them relative to the root of your site (which you’ve specified in the BASE tag), rather than the current page, which IE is using.
              wink KP
                • 15003
                • 85 Posts
                @kp52 - You Made my DAY! Thank you! So simple:-)

                I updated my tag-menu-option chunk to:
                <option value="/[~[+id+]~]">[+pagetitle+]</option>

                Thank you, Thank you, THANK YOU:-)
                Jules