Posted By

hotdiggity on 11/09/11


Tagged

snippet modx ditto evo


Versions (?)

MODx Ditto call within snippet: Alters parameters according to parent ID


 / Published in: PHP
 

  1. <?php
  2. //Switch chunk based on docID and embed snippet call
  3.  
  4. $id = $modx->documentIdentifier;
  5.  
  6. // Ditto parameters
  7. $params['startID'] = '39';
  8. $params['display'] = '3';
  9. $params['depth'] = '1';
  10. $params['hideFolders'] = '1';
  11. $params['seeThruUnpub'] = '1';
  12. $params['showPublishedOnly'] = '1';
  13. $params['sortBy'] = 'createdon';
  14. $params['sortDir'] = 'DESC';
  15. $params['tpl'] = 'link_tpl';
  16.  
  17. if ($pid['id'] == 1750) {
  18. $params['start'] = '3';
  19. }
  20. $output = $modx->runSnippet('Ditto', $params);
  21. return "$output";
  22. ?>

Report this snippet  

You need to login to post a comment.