We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    DER!@

    Solved my issue by removing &depth=`0`

    I would like to bring up that Ditto is very cool, but as I read over and over again, there is a lack of examples. I took a look at the compiled documentation and left it with less understanding than I started with.
      • 4749
      • 623 Posts
      Thought I got it working, but no such luck. I have been toying with it for days trying to figure it out. Now, the debug menu won’t even display! What’s going on? Ditto is adding several bogus entries to the summaries page. I only have 9 properties to display in that section, but it displays 21! 12 extra properties and I have no idea why. Here is my ditto call:

      [[Ditto?&parents=`52`&depth`0`&tpl=`preview`&display=`all`&debug=`1`]]

      Here’s my tree:

      -Home
      +Properties
      +Section 1
      -Prop 1
      -Prop 2
      -Prop 3
      +Section 2
      -Prop 1
      -Prop 2
      -Prop 3
      +Section 3
      -Prop 1
      -Prop 2
      -Prop 3
      -Contact Us
      -About Us

      I’m using the Tabbed Menu that is in the wiki tutorial to display the three sections on the same page so the client doesn’t have to reload a page to get to a new section. http://wiki.modxcms.com/index.php/Tabbed_content


      Anyone have any idea as to what I’m doing wrong?

      Thanks.
        The MODx has you...
        Utah Web Design
        • 10226
        • 412 Posts
        I would try this..

        [!Ditto?&tpl=`preview`&display=`all`&debug=`1`!]

        if that works, add your &depth if you need it and drop the debug.

        Good Luck!
          • 4749
          • 623 Posts
          Thanks, but it’s still not working. It’s almost like it’s ignoring the call altogether. I’ve cleared my cache and forced refresh to no avail. Still getting unwanted summaries. It’s very strange. The other two sections are working fine. It’s just the first section that isn’t working and the debug menu won’t work! Go figure.

          [UPDATE]: I just updated to the new Ditto Beta and now all of the sections are displaying the same data. With extra summaries. Unbelievable! Now I’m even more lost. If anyone has any ideas let me know.
            The MODx has you...
            Utah Web Design
            • 10226
            • 412 Posts
            Hmm.. are you using ditto to call on other ditto calls? If so I think you need to alternate between cached and uncached calls. Thats all I can think of.
              • 4749
              • 623 Posts
              Here’s the chunk that’s calling for all the information in the tabbed section:


              <div id="tabs">

              <div id="nav">
               
              <ul>
              <li onclick="javascript:doShow(this, ’one’);" class="active">Atkinson Properties</li>
              <li onclick="javascript:doShow(this, ’two’);">Walker Asset Management</li>
              <li onclick="javascript:doShow(this, ’three’);">Infinity Real Estate Holdings</li>
              </ul>

              </div>
               
              <div id="data">
               
              <div id="one" class="active">[!Ditto?&parents=`52`&depth=`0`&tpl=`preview`&display=`all`!]</div>
              <div id="two">[!Ditto?&parents=`62`&depth=`0`&tpl=`preview`&display=`all`!]</div>
              <div id="three">[!Ditto?&parents=`63`&depth=`0`&tpl=`preview`&display=`all`!]</div>

              </div>
               
              </div>

              The debug menu is showing up now, but it’s not working. It’s just opening up a new window..?

              I can’t think of anything else to do!
                The MODx has you...
                Utah Web Design