We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16892
    • 107 Posts
    MODx 0.9.5
    Ditto 2.0.3
    PHx 2.1.3

    I also have Ditto 1.0.2 installed. Ditto2 is for the 2.0.3 version.

    I can’t figure out why this Ditto call won’t work:

     [[Ditto2? &documents=`27` &tpl=`dto_tpl_historyHomePage` &hideFolders=`0` &hiddenFields=`featureImageThumb,featureImageCaption,featureImageTitle`]]


    Here is the corresponding tpl:

    <h1 class="yellow" style="text-transform: uppercase;">[+pagetitle+]</h1>
    <div class="contentBlock">
    <div class="ImageLeft floatLeft">
    [+phx:if=`[+featureImageThumb+]`:is=``:then=``:else=`<img src="[(rb_base_url)]images/[+featureImageThumb+]" alt="Photo of [+featureImageCaption+]">`+]
    [+phx:if=`[+featureImageCaption+]`:is=``:then=``:else=`<span class="caption">[+featureImageCaption+]</span>`+]
    [+phx:if=`[+featureImageTitle+]`:is=``:then=``:else=`<span class="title">[+featureImageTitle+]</span>`+]
    </div>
    <h2><a href="[~[+id+]~]" title="[+pagetitle+]">[+pagetitle+]</a></h2>
    [+introtext+]
    </div>
    
      • 18397
      • 3,250 Posts
      Could you please provide the debug output of the call?

      • Append &debug=`1` to the call
      • Click "Save Debug Console"
      • Rename the extension to .txt
      • Attach to the post
      Also, what specifically is wrong with the call? Are no results showing? Is the template mangled?
        • 16892
        • 107 Posts
        It was hosing the page. I had to rename ditto 1.0.2 to something else and let ditto 2.0.3 be [[Ditto]] and the call worked and the template shows correctly.

        However, I have many ditto calls still using the 1.0.2 parameters. However, MaxiGallery, RandomQuote and GetField snippets are showing instead of being processed. In the case of the MaxiGallery calls, the call is within a Ditto template. So is the GetField call. Is there a problem with snippet calls nested in a ditto tpl? Or is there something in general that would be causing the other snippet calls not to be processed?

        Thanks.

          • 16892
          • 107 Posts
            • 18397
            • 3,250 Posts
            To add support for Ditto 1.x parameters just add &config=`compatibility` to the Ditto 2 call or to enable it across all Ditto 2 calls rename the compatibility.config.php to default.config.php (replacing it).