itemCollection->findOne($this->name, [ 'filter[slug][eq]' => $slug, 'filter[status][eq]' => 'published' ]); } /** * find single page with a slug, * page must be published * * @param string $slug * @return array */ public function findByView($view) { return $this->itemCollection->find($this->name, [ 'filter[view][eq]' => $view, 'filter[status][eq]' => 'published' ]); } }