Return to Snippet

Revision: 52996
at November 9, 2011 10:43 by hotdiggity


Initial Code
<?php
//Switch chunk based on docID and embed snippet call

$id = $modx->documentIdentifier;

 // Ditto parameters
  $params['startID'] = '39';
  $params['display'] = '3';
  $params['depth'] = '1';
  $params['hideFolders'] = '1';
  $params['seeThruUnpub'] = '1';
  $params['showPublishedOnly'] = '1';
  $params['sortBy'] = 'createdon';
  $params['sortDir'] = 'DESC';
  $params['tpl'] = 'link_tpl';

if ($pid['id'] == 1750) {
  $params['start'] = '3';
  }
  $output = $modx->runSnippet('Ditto', $params);
  return "$output";
?>

Initial URL

                                

Initial Description

                                

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

Initial Tags

                                

Initial Language
PHP