Created
August 2, 2009 17:20
-
-
Save anttih/160141 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Runs after _forward | |
* | |
* @return void | |
* | |
*/ | |
protected function _postRun() | |
{ | |
parent::_postRun(); | |
$this->tags = $this->_entries | |
->getRelated('tagmap') | |
->getModel() | |
->fetchAllTags(); | |
if ($this->list) { | |
// how do we get latest? | |
$paging = $this->list->getPagerInfo(); | |
if ($paging['page'] == 1) { | |
// we are on the first page | |
// use list as latest | |
$this->latest = $this->list; | |
} | |
} | |
// still no latest? | |
if (! $this->latest) { | |
// fetch first 10 | |
$params = array( | |
'cols' => array('id', 'permalink', 'subj'), | |
'order' => 'published DESC', | |
'page' => 1, | |
'paging' => 10, | |
); | |
$this->latest = $this->_entries->fetchAll($params); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment