I'm trying to write a plugin, witch compares schedconfs endDate and current date in order to make current conf not appear in archive page. First I'm trying to get endDates and display it in archive page.
This is the problem: to get schedconf enddate i'm using code:
- Code: Select all
function getEndDate() {
$schedConf =& Request::getSchedConf();
$endDate=date("Y-m-d",$schedConf->getSetting('endDate'));
return $endDate;
In archive.tpl inserted smarty function witch returns result of my getEndDate() function, then I get error message: Fatal error: Call to a member function getSetting() on a non-object. Clear that Request::getSchedConf() depends on schedconf url.
Question: how to get schedconf endDate when visiting archive page?