public function page()
    {
        $page = Page::html();
        $listings = $this->config('blog', 'listings');
        if ($page->url['format'] != 'html') {
            $file = (preg_match('/\.(txt|json|xml|rdf|rss|atom)$/', $page->url['path'])) ? $this->folder.'content/'.$page->url['path'].'.twig' : null;

            return (is_file($file)) ? trim($this->theme->renderTwig($file)) : false;
        } elseif ($id = $this->file($page->url['path'])) {
            $params = array('id' => $id, 'path' => $page->url['path']);
            $method = 'blog';
        } elseif ($route = $page->routes(array(
            $listings,
            $listings.'/[archives:path]/[i:year]?/[i:month]?/[i:day]?',
            $listings.'/[authors|tags:path]/[:name]?',
            '[**:category]',
        ))) {
            $params = $route['params'];
            $method = (isset($params['path'])) ? $params['path'] : 'listings';
            if ($method == 'listings' && $search = $page->request->query->get('search')) {
                $params['search'] = $search;
            }
        }
        if (!isset($method) || (isset($params['category']) && !is_dir($this->folder.'content/'.$params['category']))) {
            $template = false;
        } elseif ($template = $this->$method($params)) {
            $template = array_combine(array('file', 'type', 'vars'), $template);
            $template['default'] = __DIR__.'/templates/';
            $this->theme->vars['blog']->properties['page'] = $template['type'];
        }

        return $template;
    }
public function page()
    {
        $page = Page::html();
        $listings = $this->config('blog', 'listings');
        if ($page->url['format'] != 'html') {
            $file = (preg_match('/\.(txt|json|xml|rdf|rss|atom)$/', $page->url['path'])) ? $this->folder.'content/'.$page->url['path'].'.twig' : null;

            return (is_file($file)) ? trim($this->theme->renderTwig($file)) : false;
        } elseif ($id = $this->file($page->url['path'])) {
            $params = array('id' => $id, 'path' => $page->url['path']);
            $method = 'blog';
        } elseif ($route = $page->routes(array(
            $listings,
            $listings.'/[archives:path]/[i:year]?/[i:month]?/[i:day]?',
            $listings.'/[authors|tags:path]/[:name]?',
            '[**:category]',
        ))) {
            $params = $route['params'];
            $method = (isset($params['path'])) ? $params['path'] : 'listings';
            if ($method == 'listings' && $search = $page->request->query->get('search')) {
                $params['search'] = $search;
            }
        }
        if (!isset($method) || (isset($params['category']) && !is_dir($this->folder.'content/'.$params['category']))) {
            $template = false;
        } elseif ($template = $this->$method($params)) {
            $template = array_combine(array('file', 'type', 'vars'), $template);
            $template['default'] = __DIR__.'/templates/';
            $this->theme->vars['blog']->properties['page'] = $template['type'];
        }

        return $template;
    }
public function page ( ) { $ page = Page :: html ( ) ; $ listings = $ this -> config ( 'blog' , 'listings' ) ; if ( $ page -> url [ 'format' ] != 'html' ) { $ file = ( preg_match ( '/\.(txt|json|xml|rdf|rss|atom)$/' , $ page -> url [ 'path' ] ) ) ? $ this -> folder . 'content/' . $ page -> url [ 'path' ] . '.twig' : null ; return ( is_file ( $ file ) ) ? trim ( $ this -> theme -> renderTwig ( $ file ) ) : false ; } elseif ( $ id = $ this -> file ( $ page -> url [ 'path' ] ) ) { $ params = array ( 'id' => $ id , 'path' => $ page -> url [ 'path' ] ) ; $ method = 'blog' ; } elseif ( $ route = $ page -> routes ( array ( $ listings , $ listings . '/[archives:path]/[i:year]?/[i:month]?/[i:day]?' , $ listings . '/[authors|tags:path]/[:name]?' , '[**:category]' , ) ) ) { $ params = $ route [ 'params' ] ; $ method = ( isset ( $ params [ 'path' ] ) ) ? $ params [ 'path' ] : 'listings' ; if ( $ method == 'listings' && $ search = $ page -> request -> query -> get ( 'search' ) ) { $ params [ 'search' ] = $ search ; } } if ( ! isset ( $ method ) || ( isset ( $ params [ 'category' ] ) && ! is_dir ( $ this -> folder . 'content/' . $ params [ 'category' ] ) ) ) { $ template = false ; } elseif ( $ template = $ this -> $ method ( $ params ) ) { $ template = array_combine ( array ( 'file' , 'type' , 'vars' ) , $ template ) ; $ template [ 'default' ] = __DIR__ . '/templates/' ; $ this -> theme -> vars [ 'blog' ] -> properties [ 'page' ] = $ template [ 'type' ] ; } return $ template ; }
Determine if there is any Blog content associated with the current url path.

@return mixed Either ``false`` if there is not a corresponding ``$page->url['path']`` Twig template, a string if ``$page->url['format'] != 'html'``, or an array suitable for passing to ``$blog->theme->renderTwig($file)`` with the following keys:

- '**file**' => The appropriate Twig template that is equipped to deal with these '**type**' of '**vars**'.
- '**type**' => The kind of Blog page you are working with.  Either *'page'*, *'post'*, *'category'*, *'index'*, *'archives'*, *'authors'*, or *'tags'*.
- '**vars**' => For the Twig template to utilize.
- '**default**' => An alternate '**file**' to use if it's missing in your theme.

```php
if (is_array($file = $blog->page())) { // An 'index.html.twig' file
$html = $blog->theme->renderTwig($file);
} elseif ($file !== false) { // A 'txt', 'json', 'xml', 'rdf', 'rss', or 'atom' page
$page->send(Asset::dispatch($page->url['format'], $file));
}
```
Determine if there is any Blog content associated with the current url path .