How to add an admin page for a custom widget in So

2019-08-27 03:52发布

How can we create an administration panel page for a custom widget in social engine 4? I have not found any information regarding this over the internet.

1条回答
Lonely孤独者°
2楼-- · 2019-08-27 04:06

You should create a controller, for example, 'AdminSettingsController.php' in application/modules/Yourmodule/controllers/

In this controller:

class User_AdminManageController extends Core_Controller_Action_Admin

Then create public function indexAction() inside. It will contain all your code related to your custom widget.

After that you should create a view in application/modules/Yourmodule/views/scripts/admin-settings/ called 'index.tpl'.

Now you can access your administration panel page by the link yoursite.com/admin/yourmodule/settings

Hope this helps.

查看更多
登录 后发表回答