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

    I have just downloaded the latest version of Modx and all works well but I just cant seem to get Ditto working? This is a noob question, but where do I start to add content? I have added the [[Ditto]] tag to my main template but when I go to my template it says that ’No documents found’ obviously because I have not added any content to Ditto.

    I hope someone can help!

    Thanks in advance,

    John
      • 7231
      • 4,205 Posts
      Ditto displays you documents (MODx documents that is), so you need to tell it where to find these documents. Then you need to create the look for the way it is to dispaly the documents, that;s where the template chunks and other tools come into play.

      Check out the Ditto site for some technicall info plus some (very few) examples. Then dive into the Ditto sub-forum and start looking around. Also if you have not done so you can install MODx with the demo site and see how Ditto is implemented there (it is used in the blog section).

      http://ditto.modxcms.com/

      Here is an example of a Ditto call (from the demo site):
      [[Ditto? &startID=`2` &summarize=`2` &removeChunk=`Comments` &tpl=`ditto_blog` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1` &tagData=`id`]]
        [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]
        • 25100
        • 5 Posts
        Thanks for your reply dev_cw, I dont want to sound like a dipstick but I still cant find out how to make a MODx document and to display that MODx document in my site??? I have searched the web and the forums but it seems as if I am the only one that cant get Ditto to work using MODx documents? I have made a nice site localy and I understand how the TV work and all that but all I need is Ditto to work...

        So if you could point me in the right direction on how to create MODx documents then that would be a grate help! I also had a look at the link you sent but it only has tag on how to display Ditto posts but not how to create MODx documents.

        Thanks allot for your support.

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Normally you create document in the Manager. Plan your document structure; the Document Tree will show the parent/child relationships between your documents. Some documents will act as parent/container documents, but otherwise they are documents like any other.

          To use Ditto, create a document to act as the container for your news or blog documents. Right-click on it, and select "Create document here". This will create a new document with the container document as its parent. Or you can change the parent of existing documents to the ID of your container document. We will presume you want the list of summaries and links to appear on that container document:

          Home
          News
          news1
          news2
          news3
          etc
          Contact

          So on the News document, place your Ditto snippet call, specifying the ID of the container document (in this case, the News document). Ditto will display the list of summaries with links for all the the News document’s children.

          You can put the Ditto call on any document you want, just specify the ID of the container/parent of the articles you want listed. This is commonly done to have two or three of the latest news headlines on the home page, for example. The main News page will still have a list of more extensive summaries and links.

          There are several ways to configure Ditto, you can best learn about this by looking into the documentation and the Wiki examples for it.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 25100
            • 5 Posts
            YES!! it now works thanks to your helpful guide! Thanks allot sottwell and dev_cw!! You guys ROCK!