We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33497
    • 30 Posts
    Ditto Call:
    [!Ditto? &tpl=`DittoTemplate` &parents=`52` &language=`german` &summarize=`1` &debug=`0` &multiLevel=`1`
     &paginate=`1` &paginateAlwaysShowLinks=`1` &sortBy=`pub_date` &showPublishedOnly=`1` &extenders=`summary` !]
    


    DittoTemplate:
    <div class="ditto_summaryPost">
        <h4>[+pagetitle+]</h4>
        <h3><a href="[~[+id+]~]" title="[+description+]">[+longtitle+]</a></h3>
        <div>[+summary+]</div>
        <p>[+link+]</p>
    </div>
    


    Output:
    <div class="ditto_summaryPost">
        <h4>2007</h4>
    
        <h3><a href="pe_2007.html" title=""></a></h3>
        <div></div>
        <p></p>
    </div> 
    


    So [+pagetitle+] and [+id+] work, but nothing else.
    I have allready replaced assets/snippets/ditto to make sure that the files are not corrupted after the 0.9.6 update.
      • 6726
      • 7,075 Posts
      Dumb question but it happened to the best of us : did you check the documents associated to this template does have content (e.g did you input anything in there) ?
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l&#39;outil id
        • 33497
        • 30 Posts
        Yes they have contents and the summary, title, [...] fields are set.

        Everything worked fine before the upgrade from ditto 1.0.2 to 2.0.2
          • 6726
          • 7,075 Posts
          Then I would check that every file in assets/snippets/ditto got uploaded properly during upgrade, it should work !
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 33497
            • 30 Posts
            Replaced them again, no changes.
            But I had a look at the documents.
            The title, longtitle, alias, summary fields are set properly.
            But the documents content are not placed in the normal content field. There are in some TV.
            Could that be a reason?
              • 6726
              • 7,075 Posts
              Sorry but I can’t think of an explanation here, maybe a cache issue ?

              If someone (Mark ?) could jump in on this one...
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id
                • 18397
                • 3,250 Posts
                Please post the debug output of the Ditto call by following the instructions below:

                * Append &debug=`1` to the call
                * Click "Save Debug Console"
                * Rename the extension from .html to .txt
                * Attach to the post
                  • 33497
                  • 30 Posts
                  Quote from: Mark at Jul 11, 2007, 08:53 AM

                  Please post the debug output of the Ditto call by following the instructions below:

                  * Append &debug=`1` to the call
                  * Click "Save Debug Console"
                  * Rename the extension to .html
                  * Attach to the post

                  Here we go
                  Not allowed to upload *.html
                    • 10449
                    • 956 Posts
                    But the documents content are not placed in the normal content field. There are in some TV.
                    Could that be a reason?

                    I think so. Did you try http://wiki.modxcms.com/index.php/Ditto_Placeholders#Ditto-Specific_TV_Method ?
                    [+tvtemplatevariablename+]
                      • 18397
                      • 3,250 Posts
                      @ganeshXL: Most of the documents in the wiki refer to the now deprecated Ditto 1.0.x series. The tv prefix is no-longer needed in Ditto 2.0

                      @ZeTi: According to the debug output Ditto fetched all of the fields requested and set the placeholders with that info. It seems that your content / introtext, longtitle, and description fields are blank. Remember, the summary + link placeholders reference the content and introtext fields. I would suggest trying a call like this for testing after ensuring all of the fields mentioned above are filled in:

                      [!Ditto? &tpl=`DittoTemplate` &parents=`52` &language=`german` &summarize=`all` &extenders=`summary`!]