--[[+fi.category]]-- [[[[+fi.category:eq=`Day`:then=`$chunk.day`:else=`$chunk.night`]]]]
[[[[!+fi.category:eq=`Day`:then=`!$chunk.day`:else=`!$chunk.night`]]]]
you have formitRetriever running above this tag?
--[[+fi.category]]--
[[[[!getReqParam:eq=`Day`:then=`!$chunk.day`:else=`!$chunk.night`? &name=`category`]]]]
you have formitRetriever running above this tag?
[[!DayNight? &cat=`[[+fi.category]]`]]
<?php
/* DayNight snippet */
$cat = $modx->getOption('cat', $scriptProperties, '';
if (empty($cat)) {
return 'Category not set';
}
$chunk = ($cat == 'Day')? 'chunk.day' : 'chunk.night;
return $modx->getChunk($chunk);<?php
/* DayNight snippet */
return $modx->getChunk($modx->getOption('cat', $scriptProperties));