Next Chapter: CakePHP 2 Layout for RSS

CakePHP 2 Controller for RSS

2019-05-13 16:26:34.08234+00

Let start with the controller code of CakePHP.

touch /usr/local/www/logikfabrik.com/cakephp/app/Controller/RssController.php

Here is the complete controller action

layout = 'rss/default';

    // get recently updates chapters:   
    $recent = $this->Rss->getRecent();
    $this->RequestHandler->setContent('rss','application/rss+xml');
    $this->response->type('xml');

    // return the result to the view
    return $this->set(compact('recent'));
}



}

Tag: cakephp2

Previous Chapter: CakePHP 2 Model for RSS

Next Chapter: CakePHP 2 Layout for RSS