We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    I have to apologize in advance, I know it’s going to turn out to be something simple. I have just been looking at this so long I am missing something I know it.

    ModX 0.9.5
    Ditto 1

    [!Ditto? &parents=`5` &tpl=`coachTpl` &display=`all`&debug=`1`!]

    When I debug this is what I get:
    [+id+] => 9
    [+type+] => document
    [+contentType+] => text/html
    [+pagetitle+] => Dr. Morris
    [+longtitle+] =>
    [+description+] =>
    [+alias+] =>
    [+link_attributes+] =>
    [+published+] => 1
    [+pub_date+] => 0
    [+unpub_date+] => 0
    [+parent+] => 5
    [+isfolder+] => 0
    [+introtext+] =>
    [+richtext+] => 1
    [+template+] => 7
    [+menuindex+] => 0
    [+searchable+] => 1
    [+cacheable+] => 0
    [+createdby+] => 1
    [+createdon+] => 1188436944
    [+editedby+] => 1
    [+editedon+] => 1188490854
    [+deleted+] => 0
    [+deletedon+] => 0
    [+deletedby+] => 0
    [+publishedon+] => 1188486660
    [+publishedby+] => 1
    [+menutitle+] =>
    [+donthit+] => 0
    [+haskeywords+] => 0
    [+hasmetatags+] => 0
    [+privateweb+] => 0
    [+privatemgr+] => 0
    [+content_dispo+] => 0
    [+hidemenu+] => 1
    [+title+] => Dr. Morris
    [+summary+] =>
    [+link+] =>
    [+author+] => Built-in Administration account
    [+date+] => 29-Aug-07 19:22
    tpl = AltRows -> <div class="box">
    [+coachpic+]
    <h2>[+coachname+]</h2>
    <h3>[+coachtitle+]</h3>
    [+coachprofile+]


    </div>

    It’s not pulling any data for me. Nothing is showing up, the HTML is there, but nothing else. I guess I should explain that I’ve got a menu item as a container, and child pages that are only there to allow the client to easily add/change coaches through the TV’s. SO, those coach pages are only shells so ditto can extract the data.

      The MODx has you...
      Utah Web Design
      • 11975
      • 2,542 Posts
      Hi,

      I would advice you to upgrade your ditto snippet to version 2.

      I do not remember exactly how ditto 1 works with tv.

      In your tpl =>
      <div class="box">
      [+coachpic+]
      <h2>[+coachname+]</h2>
      <h3>[+coachtitle+]</h3>
      [+coachprofile+]


      </div>


      Placeholders refers to TVs
      As far as i remember you need to prefix the placeholder name for tvs values with tv
      [+tvcoachprofile+]

      And perhaps add to your call &tagData=`myTvName`

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 4749
        • 623 Posts
        [SOLVED] - Thank you Heliotrope. I’ve never used 0.9.5 and I’m not used to putting tv in front of the place holder. I’m working on this site for someone else. I’m very happy.
          The MODx has you...
          Utah Web Design
          • 11975
          • 2,542 Posts
          u’re wecome.

          about your 2nd question

          allow the client to easily add/change coaches through the TV’s

          You could add # to your placeholdername to use QuickEdit to change the values in front end when logged as manager user

          [+#coachname+]

          If you don’t see any changes then your ditto version doesn’t support this feature

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 4749
            • 623 Posts
            Heliotrope thank you for that help. I was wondering if you knew how to order the results for ditto. I want the client to be able to add coaches as they need to, but the newer coaches go on top - I need them to go underneath. So, I was thinking &sortorder=`1` but it’s not working to display oldest first

              The MODx has you...
              Utah Web Design
              • 11975
              • 2,542 Posts
              I guess the param name is &sortBy=``
              You could set it to &sortBy=`createdon` &sortDir=`ASC`

              documentation for ditto version 1 is here =>http://www.modxcms.com/ditto_documentation.html
              and parameters => http://modxcms.com/ditto_parameters.html

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l