We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3125
    • 8 Posts
    Sorry, I know there are a whole bunch of threads on this already, but none of them seem to offer a solution to my problem.

    Basically I am just trying to order a list of documents by pub_date, but it only seems to be sorting each month, not the whole list!

    My reflect call:

    [!Reflect? &dateFormat=`%d %b %Y` &dateSource=`pub_date` &getDocuments=`1` &extenders=`dateFilter` &orderBy=`pub_date DESC` &dittoSnippetParameters=`parents:66|dateSource:pub_date|orderBy:pub_date ASC|filter:pub_date,@EVAL return strtotime(’1 january’);,5` &id=`asxarch` groupByYears=`0` &tplYear=`asxArchiveYear` &tplContainer=`asxArchive` &tplMonth=`asxArchive` &tplMonthInner=`asxArchive` &tplYearInner=`asxArchive` &tplItem=`asxReleasesList` !]

    Outputs:
    13 Jan 2009 Change in Substantial Holding
    19 Jan 2009 Posse Iron Resources Grows Greater Than 400%
    19 Jan 2009 Change in Substantial Holding
    20 Jan 2009 Change in Substantial Holding
    05 Feb 2009 Quarterly Activities and Cashflow Report
    16 Mar 2009 Half Year Accounts

    Changing: ’orderBy:pub_date ASC’ to ’orderBy:pub_date DESC’ results in:

    20 Jan 2009Change in Substantial Holding
    19 Jan 2009Change in Substantial Holding
    19 Jan 2009Posse Iron Resources Grows Greater Than 400%
    13 Jan 2009Change in Substantial Holding
    05 Feb 2009Quarterly Activities and Cashflow Report
    26 Mar 2009Change in Substantial Holding

    Any idea how I can get my reflect call to order the whole list?

    Cheers.
      • 36592
      • 970 Posts
      Quote from: benperth at Jan 06, 2010, 08:00 AM

      Basically I am just trying to order a list of documents by pub_date, but it only seems to be sorting each month, not the whole list!
      Why are you using Reflect ?
      I suppose Ditto is for your needs...
        • 3125
        • 8 Posts
        Because I need it grouped by years, so it formats like so:

        2009:
        - 01/12/09 document 1
        - 10/12/09 document 2
        - 20/12/09 document 3

        2008:
        - 01/12/08 document 4
        - 10/12/08 document 5
        - 20/12/08 document 6
        etc..

        Any idea on my sorting problem?