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

    I’m trying to build one of my projects with MODx cms and I done the easeast part, but now comes the hard smiley

    Here is the situation: http://www.goaddsite.com/debts-and-loans4/

    Take a look into the up section and latest news section and debt questions section:

    All this will be items from different categories or items from the same category it depends on the pages (home or inner page).

    My question is how I should sort and what kind of snippet should I use to make this happen? I mean to take a title and date from the latest posts in different categories and placed it on the home page. Similar task I would like to accomplish in the categories I’ll sort the latest items and put them as a latest news in deferent categories.

    Please take a look at the link and you will understand what I’m trying to do (http://www.goaddsite.com/debts-and-loans4/).... I hope smiley
      • 16183
      • 1,390 Posts
      Welcome to modx dtstyle  grin

      The snippet Ditto will certainly do this for you. It is very powerful and very customisable.

      You can find its documentation here: http://ditto.modxcms.com/

      and its sub-forum here: http://modxcms.com/forums/index.php/board,180.0.html

      Go through the forum to see examples, implementations, etc...

      all the best!

      /k  smiley
        • 8161
        • 39 Posts
        Thanks!

        I’ll try to help myself laugh
          • 8161
          • 39 Posts
          I read the available information about ditto, but I really cant’t figure out how to solve my problems...even for a person with basic php, mysql and perfect xml, xsl, html, css skills it’s not easy.

          Could somebody just give me an example http://www.goaddsite.com/debts-and-loans4/ for doing this job.

          Take the last three items from "debt questions" category and publish them on the right part on every page or on the home page.

          Thanks!
            • 7231
            • 4,205 Posts
            The error you are getting indicates that you have a bad &tpl setup (with missing placeholders or something). To sort you need to use the &orderBy parameter which looks just like the ORDER BY clause in a SQL statement. So to order by the pagetitle descendantly you would have: &orderBy=`pagetitle, DESC`. You can sort by any document or template variable.

            Note: In the previous versions of Ditto you would use &sortBy=`pagetitle` &sortDir=`DESC`.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]