- <?php
- private static $allowed_actions = array (
- 'article'
- );
- public function article(SS_HTTPRequest $r) {
- $a = Article::get()->filter('URLSegment' => $r->param('ID'))->first();
- if(!$a) {
- return $this->httpError(404);
- }
- return Article_Controller::create($a);
- }