We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20865
    • 30 Posts
    I have a ditto call
    [!Ditto? &parents=`getparent(if getparent, parents=$_GET)` &tpl=`textlist` &summarize=`1` &display=`all` &paginate=`0` &paginateAlwaysShowLinks=`0` &orderBy=`menuindex ASC` &filter=`filter(also $_GET param to exclude current)`!]
    and in my tpl I have
    <li style="text-align:center;float:left;"><a desc="" href="index.php?id=13&amp;pid=[+id+]&amp;num=1" alt="">[!MultiPhotos? &tvname=`Collection` &rowTpl=`seealsocool` &id=`[+id+]` &fid=`1`!]</a></li> .
    How I can run MultiPhotos with this ditto call? Now it returns just [!MultiPhotos? &tvname=`Collection` &rowTpl=`seealsocool` &id=`29` &fid=`1`!], but not the picture.
    PS modx evo.
      • 20865
      • 30 Posts
      added &megacool=`true` and if statement in ditto snippet(where for cycle is) :
      if($megacool == "true") 
      { 
      $megacool = $modx->runSnippet('MultiPhotos', array('id' => $resource[$x]["id"], 'tvname' => 'Collection', 'rowTpl' => 'seealsocool', 'fid' => '1'));
       } 
      else { 
      $megacool = "";
      }
                  $output .= $renderedOutput.$megacool;
                      // send the rendered output to the buffer
        • 20865
        • 30 Posts
        is working when there are 1 resource, and when there are 2 or more - it is adding chunks in wrong places...