Skip to content

Instantly share code, notes, and snippets.

@TomHAnderson
Created November 15, 2012 20:30
Show Gist options
  • Save TomHAnderson/4081065 to your computer and use it in GitHub Desktop.
Save TomHAnderson/4081065 to your computer and use it in GitHub Desktop.
Parsing a view templete and returning result
public function infiniteScroll($page) {
$view = $this->getServiceLocator()->get('View');
$model = new ViewModel();
$model->setTemplate('scripts/infinite-scroll/main.phtml');
$model->setVariable('page', $page);
$model->setOption('has_parent', true);
return $view->render($model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment