Hi,
I’m creating a plugin in Cakephp 4 for CRUD email alias through my webhosting’s API (OVH API).
My plugin OvhManager
uses prefix Admin
and contains :
EmailAliasController
- templates
index
,add
,edit
The layout used to render this templates is the App’s one (named admin-layout
and outside of my plugin).
When I follow a route of my plugin (e.g /admin/ovh-manager/email-alias/index
), all the links in the layout are wrong because they all have 'plugin' => 'OvhManager'
automatically added.
I could add 'plugin' => null
to all the links of the layout but it seems a hard work to me.
Is there a better way to disable plugin in the links generated in the layout ?
For example is there a way in my EMailAliasController::beforeFilter()
to tell to use admin-layout
but without adding the plugin OvhManager to the routes ?