We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15152
    • 360 Posts
    I’ve seen this around and read through everything but I can’t get it to work. Maybe I’m missing something.

    I need to sort items in Ditto through a date the user chooses (TV).

    I’m using Ditto 2.1, PHP Version 5.2.9, mySQL 5.1.30.

    The date does NOT have to display, though it could.

    Any ideas.

      There are no boring projects. Only boring executions. ~ Etzkorn
      www.impress-design.com
      • 16278
      • 928 Posts
      As long as the date TV uses the unixtime widget, you just use its name as the sort parameter in &orderBy:
      [!Ditto?parents=`99` &orderBy=`myDateTv ASC` !]

      smiley KP


        • 12028
        • 152 Posts
        Maybe this can help you:

        [[Ditto? &tpl=`tpl-abc` &dateSource=`startdate` &dateFormat=`%d.%m.%Y` &sortBy=`startdate` &sortDir=`ASC`]] 


        But remember that the tv should be set as:
        Input type: Date
        Widget: Unix time
          - A small step for mankind, so why not take two...

          Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
          • 15152
          • 360 Posts
          Thanks, guys. That worked. KP52 - I wasn’t using &sortBy I had &orderBy.

          I appreciate the help.
            There are no boring projects. Only boring executions. ~ Etzkorn
            www.impress-design.com