public function rss()
    {
        if (!appSetting('rss_enabled', 'blog-' . $this->oBlog->id)) {

            show404();
        }

        // --------------------------------------------------------------------------

        //  Get posts
        $data                    = array();
        $data['include_body']    = true;
        $data['include_gallery'] = appSetting('home_show_gallery', 'blog-' . $this->oBlog->id);
        $data['sort']            = array('bp.published', 'desc');

        //  Only published items which are not schduled for the future
        $data['where']   = array();
        $data['where'][] = array('column' => 'blog_id',      'value' => $this->oBlog->id);
        $data['where'][] = array('column' => 'is_published', 'value' => true);
        $data['where'][] = array('column' => 'published <=', 'value' => 'NOW()', 'escape' => false);

        $this->data['posts'] = $this->blog_post_model->getAll(null, null, $data);
        $this->data['isRss'] = true;

        //  Set Output
        $oOutput = Factory::service('Output');
        $oOutput->set_content_type('text/xml; charset=UTF-8');

        $this->loadView('rss', $this->data);
    }