protected function isOnPage($page, $loose = true)
    {
        $page = $loose ? $page : '^'.$page.'$';
        $page = str_replace('#', '\#', $page);

        return (bool) preg_match('#'.$page.'#', $this->request->path());
    }