getOption(\'startYear\', $scriptProperties); $separator = (string) $modx->getOption(\'separator\', $scriptProperties, \'-\'); $static = (bool) $modx->getOption(\'static\', $scriptProperties, 0); $tpl = (string) $modx->getOption(\'tpl\', $scriptProperties, \'sc_chunk\'); if($static&&!empty($startYear)){ // is static : can be the future too $construct = $startYear; } elseif(!empty($startYear)) { // is semi dynamic : set with a starting year that never exceeds the future $construct = ($startYear>=$currentYear ? $currentYear : $startYear.$separator.$currentYear); } else { // is dynamic : changes with each year $construct = $currentYear; } // Get a chunk to style the output & check if it exists... $chunk = $modx->getObject(\'modChunk\',array( \'name\' => $tpl )); if (!$chunk){ // If no chunk is found return error & write to log $modx->log(xPDO::LOG_LEVEL_ERROR, \'No chunk found!\'); return \'No chunk found!\'; } else { $outputString = $modx->getChunk($tpl,array( \'output\' => $construct )); } return $outputString; return; ';