We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    Sorry for the lame topic I can’t think of how to explain it. First off take a look here > http://sweetskies.fruitwerks.us/babies.php as we can see that is a Ditto generated output. What I would like to is create a ’details’ link within every available bird that opens up an iframe with expanded info. I got the iframe part down. But I am befuddled as how to call the data. Do i create a "nested" call on the child? I want to add data from the specific listing and pull data in from another page corresponding to the type of bird. I have the latter figured out, just confused with the nesting.

    Thanks!
      • 29181
      • 480 Posts
      One option I have used before is to use a snippet with getTemplateVarOutput to grab the data I require. The only thing I need to pass to the snippet is the document ID.

      OK, I have never used it in conjunction with ditto, but I’m pretty sure you can pass the ditto placeholder [+id+] as a parameter to a snippet call [!getTVdata?&docid=`[+id+]`!]

      <?php
      global $modx;
      $result=$modx-> getTemplateVarOutput($idname=array("theFieldIwant"), $doc_id);
      return $result['theFieldiWant'];
      ?>


      Something along those lines perhaps. You can use getTemplatVarOutput to return more than one TV and all other document related things like content or pagetitle too. No testing done so take it with a pinch (or entire shaker) of salt.

      Hope that gets you on the right track.

      Cheers,
      Taff
        Adrian Lawley: www.adrianlawley.com