Posted By

chucktrukk on 02/16/08


Tagged

php textmate template variable modx


Versions (?)

chunkListParser


 / Published in: PHP
 

  1. <?php
  2.  
  3. $ar_chunks = split(',',$chunks);
  4. $ar_chunks = array_unique($ar_chunks);
  5.  
  6. $output = '';
  7.  
  8. foreach ($ar_chunks as $chunk) {
  9. if ($chunk != '') {
  10. $c = $modx->getChunk($chunk);
  11. if ($c) $output .= $c;
  12. }
  13. }
  14.  
  15. if ($output != '' && isset($wrapperdiv)) {
  16. $output = '<div id="'.$wrapperdiv.'">'.$output.'</div>';
  17. }
  18.  
  19. return $output;
  20.  
  21. ?>

Report this snippet  

You need to login to post a comment.