$eventArray = $this->getEventsFromXml( $this->getProperty( 'google_xml_cache_file' ), 'entry' );
$tplOuter = file_get_contents( $this->getProperty( 'eventlist' ) );
$chkOuter = $this->modx->newObject( 'modChunk' );
$chkOuter->setCacheable( false );
$tplRow = file_get_contents( $this->getProperty( 'eventitem' ) );
$chkRow = $this->modx->newObject( 'modChunk' );
$chkRow->setCacheable( false );
// loop through events and write template item
foreach( $eventArray as $eventItem ) {
$rowsOutput .= $chkRow->process( $eventItem, $tplRow );
}
$aOuterTpl = array();
$aOuterTpl['rowsOutput'] = $rowsOutput;
$content = $chkOuter->process( $aOuterTpl, $tplOuter );
return $content;$tplRow = file_get_contents( $this->getProperty( 'eventitem' ) ); $chkRow = $this->modx->newObject( 'modChunk' ); $chkRow->setCacheable( false );
foreach( $eventArray as $eventItem ) {
$rowsOutput .= $chkRow->process( $eventItem, $tplRow );
}
$aOuterTpl = array();
$aOuterTpl['rowsOutput'] = $rowsOutput;
$content = $chkOuter->process( $aOuterTpl, $tplOuter );
return $content;
foreach( $eventArray as $eventItem ) {
// $rowsOutput .= $chkRow->process( $eventItem, $tplRow );
$content .= '<p>' . $eventItem . '</p>';
}
// $aOuterTpl = array();
// $aOuterTpl['rowsOutput'] = $rowsOutput;
// $content = $chkOuter->process( $aOuterTpl, $tplOuter );
return $content;
<li> <a href="[[*alias]]/[[!+id:getIdFromGCalLink]]"> [[!+title]] </a> </li>
$rowsOutput .= $modx->getChunk($tplRow, $eventItem);
$rowsOutput = '';
$rowsOutput = '';
foreach( $eventFeed as $event )
{
$calItem = $this->getDataFromCalItem( $event );
$rowsOutput .= $this->getChunk( $this->getProperty( 'eventitem' ), $calItem );
}
$aOuterTpl = array();
$aOuterTpl['rowsOutput'] = $rowsOutput;
$content = $this->getChunk( $this->getProperty( 'eventlist' ), $aOuterTpl );
return $content;<li> <a href="[[*alias]]/form/[[+eventid]]"> [[!+eventtime:date=`%d-%m-%Y`]] - [[+eventtitle]] </a> </li>
