admin管理员组

文章数量:1336106

I try to add a link appear in /admin for a specific role. This specific role has a few permissions (adding specific content for example) and I would like to hide certain links appear in /admin and to add other links in this same page.

I tried to use the hook MYMODULE_page_attachments_alter but I did not find the way to add links into this.

What solution for this ?

Thanks

I try to add a link appear in /admin for a specific role. This specific role has a few permissions (adding specific content for example) and I would like to hide certain links appear in /admin and to add other links in this same page.

I tried to use the hook MYMODULE_page_attachments_alter but I did not find the way to add links into this.

What solution for this ?

Thanks

Share Improve this question asked Nov 20, 2024 at 10:29 chtoukchtouk 3111 gold badge5 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

use the yourmodule.routing.yml file to define a route, FYI "admin-routes" are not defined by having /admin in their routename, in example /node/add ;-)

本文标签: How can I add link to admin page drupal for a specific rolesStack Overflow