[[!getResources? &parents=`43` &limit=`` &tpl=`NominationListTpl` &totalVar=`total_nonprofit` &tvFilters=`nominee_category==nonprofit,createdon:strtotime:date=`%Y`===2012`]]
[[!getResources? &parents=`43` &limit=`` &tpl=`NominationListTpl` &totalVar=`total_nonprofit` &tvFilters=`nominee_category==nonprofit` &where=`{"createdon:strtotime:date=`%Y`:=":2011}`]]This question has been answered by Bruno17. See the first response.
<?php
//[[getYearArchive? &year=`2012` &parents=`100` &tpl=`myTpl`]]
$where = $modx->getOption('where',$scriptProperties,false);
$where = is_array($where) ? $where : $modx->fromJSON($where);
$where[] = 'FROM_UNIXTIME(`createdon`,"%Y") = "'.$year.'"';
$scriptProperties['where'] = $modx->toJSON($where);
return $modx->runSnippet('getResources',$scriptProperties);
$where = $modx->getOption('where',$scriptProperties,false);
$where = is_array($where) ? $where : $modx->fromJSON($where);
$where[] = 'FROM_UNIXTIME(`publishedon`,"%Y") = "'.$year.'"';
$scriptProperties['where'] = $modx->toJSON($where);
$scriptProperties['elementClass'] = 'modSnippet';
$scriptProperties['element'] ='getResources';
return $modx->runSnippet('getPage',$scriptProperties);