public function findPublishedPageBySlug($pageSlug)
    {
        $this->makeSelect();

        if (is_string($pageSlug)) {
            $this->sql .= ' and collection_id is null and slug = ?';
            $this->bindValues[] = $pageSlug;
        } else {
            throw new Exception('Unknown page identifier type');
        }

        $this->sql .= " and published_date <= '{$this->today()}'";

        return $this->findRow();
    }
public function findPublishedPageBySlug($pageSlug)
    {
        $this->makeSelect();

        if (is_string($pageSlug)) {
            $this->sql .= ' and collection_id is null and slug = ?';
            $this->bindValues[] = $pageSlug;
        } else {
            throw new Exception('Unknown page identifier type');
        }

        $this->sql .= " and published_date <= '{$this->today()}'";

        return $this->findRow();
    }
public function findPublishedPageBySlug ( $ pageSlug ) { $ this -> makeSelect ( ) ; if ( is_string ( $ pageSlug ) ) { $ this -> sql .= ' and collection_id is null and slug = ?' ; $ this -> bindValues [ ] = $ pageSlug ; } else { throw new Exception ( 'Unknown page identifier type' ) ; } $ this -> sql .= " and published_date <= '{$this->today()}'" ; return $ this -> findRow ( ) ; }
Find Published Page By Slug

Finds published page by by slug
Does not include collections
@param mixed  $pageSlug Page slug
@return mixed           Page object or null if not found
Find Published Page By Slug