[[!snippetName? &extendedChunk=`SomeChunkName` &basicChunk=`SomeOtherChunkName`]]
<?php
if ($modx->resource->get('id') == ('18','22','24','26')) {
$chunk = $extendedChunk;
} else {
$chunk = $basicChunk;
}
return $modx->getChunk($chunk);This question has been answered by Bruno17. See the first response.
<?php
$ids = explode(',',$modx->getOption('ids',$scriptProperties,''));
$docid = $modx->resource->get('id');
if (in_array($docid,$ids)) {
$chunk = $extendedChunk;
} else {
$chunk = $basicChunk;
}
return $modx->getChunk($chunk);
[[!snippetName? &ids=`18,22,24,26` &extendedChunk=`SomeChunkName` &basicChunk=`SomeOtherChunkName`]]