Skip to content

Instantly share code, notes, and snippets.

Created November 25, 2016 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/eaeef9d173c2e3d0b20a48f92ea91ed6 to your computer and use it in GitHub Desktop.
Save anonymous/eaeef9d173c2e3d0b20a48f92ea91ed6 to your computer and use it in GitHub Desktop.
##### http://localhost/something/test -> Error 400 "There seems to have been a technical problem. Please click the back button, refresh your browser, and try again."
##### route.yml
Director:
rules:
'something': 'ObjectName_Controller'
##### DataObject and Controller
class ObjectName extends DataObject {
}
class ObjectName_Controller extends ContentController {
private static $url_handlers = array(
'test' => 'test',
);
protected static $allowed_actions = array(
'test',
);
public function test() {
echo "HERE";
return Form::create($this, __FUNCTION__, new FieldList(), new FieldList());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment