public function view() { $ct = Type::getByDefaultsPage($this->page); $template = Template::getByID($this->page->getPageTemplateID()); $pl = new PageList(); $pl->filterByPageTypeID($ct->getPageTypeID()); $pl->filterByPageTemplate($template); $pl->ignorePermissions(); $this->set('total', $pl->getTotalResults()); }