We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27843
    • 170 Posts
    Hi,

    in documentation is that orderBy, hmm exactly this:
    orderBy<br />Purpose<br /><br />Sort the result set<br />Options<br /><br />Any valid MySQL style orderBy statement<br />Default<br /><br />createdon DESC


    But this parameter doesn’t have any effect.

    So I tried sortBy, but result is the same.

    My Ditto call looks like this:
    [!Ditto? &id=`ShopCategories` &language=`slovak-utf8` &parents=`23` &display=`10` &tpl=`dittoShop` &paginate=`1` &paginateAlwaysShowLinks=`1` &sortBy=`pagetitle DESC` &extenders=`summary,dateFilter` &tagData=`categoriesTags` &tagDelimiter=`,`!]


    How can I sort the result on the basis of pagetitle ?

    Thank you for suggestions.
      • 3707
      • 241 Posts
      The old method was to use
      &sortBy=`pagetitle` &sortDir=`DESC`

      The new method is
      &orderBy=`pagetitle DESC`

      But I guess that depends on which version of Ditto you are using.
        • 27843
        • 170 Posts
        Quote from: bob1000 at Dec 18, 2008, 04:24 PM

        The old method was to use
        &sortBy=`pagetitle` &sortDir=`DESC`

        The new method is
        &orderBy=`pagetitle DESC`

        But I guess that depends on which version of Ditto you are using.

        But anything doesn’t works for me my dittocall is
        [!Ditto? &id=`ShopProducers` &language=`slovak-utf8` &parents=`23` &display=`10` &tpl=`dittoShop` &paginate=`1` &paginateAlwaysShowLinks=`1` &orderBy=`pagetitle DESC` &extenders=`summary,dateFilter` &tagData=`producersTags` &tagDelimiter=`,`!]


        take a look:
        http://www.4golf.sk/kategorie?ShopCategories_tags=Juniori+a+deti

        Where should be the problem ? (there is no paganation now, but all ditto calls are with &orderBy=`pagetitle DESC`
          • 36592
          • 970 Posts
          What is your MySQL server version ?
            • 27843
            • 170 Posts
            Quote from: tkfm at Dec 18, 2008, 06:46 PM

            What is your MySQL server version ?

            ditto 2.0.2 and MySQL Server version: 5.0.67
              • 36592
              • 970 Posts
              Quote from: snop at Dec 18, 2008, 06:50 PM

              ditto 2.0.2 and MySQL Server version: 5.0.67
              Hmm... your Ditto is old...
              With that version, you have to use &sortBy and &sortDir.

              I’m not sure it fixes your problem, but upgrading your Ditto to the latest version might be one choice.
                • 27843
                • 170 Posts
                Now I inspect source code and any variable $orderBy only $sort, sortBy and $sortDir, so $sortxxx is exactly what i need and it works

                thank you tkfm for suggestions wink
                  • 27843
                  • 170 Posts
                  Quote from: tkfm at Dec 18, 2008, 08:37 PM

                  Hmm... your Ditto is old...
                  With that version, you have to use &sortBy and &sortDir.

                  I’m not sure it fixes your problem, but upgrading your Ditto to the latest version might be one choice.

                  you are right have a nice day