<?php
$docInfo = $modx->getDocument($modx->documentIdentifier,'id');
$page_id = $docInfo['id'];
if ( $page_id == 67 ) {
echo "<ul class=\"news\">";
$sfOutput = $modx->runSnippet(
"getPage",
array(
"elementClass" => "modSnippet",
"element" => "getResources",
"parents" => "67",
"depth" => "1",
"limit" => "10",
"pageVarKey" => "page",
"sortbyTV" => "pubDate",
"sortbyTVType" => "datetime",
"includeTVs" => "1",
"processTVs" => "1",
"tpl" => "pubRow_events"
)
);
echo $sfOutput;
echo "</ul>";
echo "<div class=\"paging\">";
echo "<ul class=\"pageList\">";
echo "[[!+page.nav]]";
echo "</ul>";
echo "</div>";
}
How about just setting the Published On date (pub_date field in the tag)?
You could have one getResources call show published documents, sorted by publishedon, and another show unpublished documents, sorted by pub_date.
<?php
if(!isset($ts)) {
$ts=time();
}
return $ts;"&where=`[{"unpub_date:<=":"[[today]]"}]`)"
[[getResources? &tpl=`monthlyCalendar` &sortby=`unpub_date` &where=`{"unpub_date:<=":}` &showUnpublished=`1` &sortdir=`asc` &includeContent=`1` &includeTVs=`1` &processTVs=`1` &showHidden=`1` &limit=`12` ]]
<?php
return date('Y-m-d H:i:s');[[!getResources? ... &tvFilters=`myDateTV>=[[curDate]]` ]]
[[!getResources? ... &tvFilters=`myDateTV<<[[curDate]]` ]]