We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22897 ☆ A M B ☆
    • 209 Posts
    I’m thinking this can’t be done without some serious surgery to MODx, but hopefully someone can put me straight wink

    A lot of MODx sites I build have a ’Related Links’ box on each page. Easy enough to do - a multi-select listbox does the trick:


    The downside? All related links have to be ordered the same way - alphabetical, by menuindex etc.

    Wouldn’t it be lovely if the order could be changed from page to page? Something like this:


    As far as I can tell the only way to do this in MODx Evolution is to hack the core to add another widget type, and add a database table to store the relation and the sort order, which then rules out using Ditto, Wayfinder or any other plugin.

    I’m sure others have thought of this when their clients have asked - is there anything I’ve missed or a lateral-thinking way round the problem?
      MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
      • 25663 MODX Staff
      • 12,272 Posts
      I suspect you could create a Manager Manager widget to accomplish this.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 34017
        • 898 Posts
        Could you.

        # change the TV from multiselect to text
        #. create a simple jquery plugin. Include it on docform
        #. hide related links
        #. create the cool javascript multi select. Whenever changes are made, update the hidden input form.

        So i think it could be done with simple javascript no?

        custom filters and output for TVs would really be nice in Evo.
          Chuck the Trukk
          ProWebscape.com :: Nashville-WebDesign.com
          - - - - - - - -
          What are TV's? Here's some info below.
          http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
          http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
          • 22897 ☆ A M B ☆
          • 209 Posts
          Interesting. I need to play and see whether Ditto/Wayfinder honor the order that individual documents are passed in if no sort order is given - i.e. if &documents=`24,12,66,2` are they displayed in that order?
            MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
            • 34017
            • 898 Posts
            Hey Peter,

            Could you create a simple snippet that read that TV value and parsed a chunk?

            The other option, I found it easiest to create custom sorting for ditto by using the config parameter.

            The code is something like this:
            $orderBy = array('parsed'=>array(),'custom'=>array(),
            'unparsed'=>'pkDate ASC');
            


            from http://www.pogwatch.com/ditto/ditto-config.html
              Chuck the Trukk
              ProWebscape.com :: Nashville-WebDesign.com
              - - - - - - - -
              What are TV's? Here's some info below.
              http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
              http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
              • 4172
              • 5,888 Posts
              Quote from: pbowyer at Sep 25, 2009, 10:05 AM

              Interesting. I need to play and see whether Ditto/Wayfinder honor the order that individual documents are passed in if no sort order is given - i.e. if &documents=`24,12,66,2` are they displayed in that order?

              you can use this extenter I’ve written some time ago:
              http://modxcms.com/forums/index.php/topic,38711.msg233570.html#msg233570

              P.S:
              dragging documents from one container into an ’refenrence-container’, (which stores the order into a parameter-given field &documentsField) in frontend can also be done with our coming front-end editor bloX/Xedit. bloX is for the listing part instead of ditto (lists documents and other arrays from tables or what else you can think) and generating the containers for sortables, if wanted. Xedit is done for the editing and storing part.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!