How to extend BEdita?

11 views
Skip to first unread message

Shurn Heng

unread,
Dec 28, 2018, 3:40:47 AM12/28/18
to BEdita
Hi BEdita team,

I'm wondering, how do I extend BEdita with my own code? Normally, I would just create a new controller in src/Controller and do my thing. But now, I get error.

In my routes.php file, I have this:

Router::scope('/', function ($routes) {

$routes->connect(
"/ImageOptimise/*",
["controller" => "ImageOptimise"]
);

//MORE ROUTES
}

But I still get this error when I browse to it:

Controller class ImageOptimise could not be found.

Dante

unread,
Dec 28, 2018, 3:48:42 AM12/28/18
to BEdita
Hi, thanks for using BEdita.

I'm not sure on what you are trying to do.
Are you using BEdita version 3.8 and trying to create a new controller for the `backend`? in that case you don't need extra routing rules... you just have to add a `module` [an old (but basically valid) guide: http://docs3.bedita.net/bedita-module-as-a-cakephp-plugin]
Or are you trying to develop a frontend that uses BEdita instance? in this case, take a look at this article: http://docs3.bedita.net/frontends/routing-rules-in-frontend-applications

Good places where looking for answers:

 - bedita.com (https://www.bedita.com/bedita3 for details on 3.8 version)
 - docs3.bedita.net (old articles, but the most part of them describe scenarios useful for 3.8 version too)

Regards,
Dante
Reply all
Reply to author
Forward
0 new messages