Drupal 8- How to use admin theme for user profile edit page while editing the profile by an administrator.

Example: when admin takes the URL: www.mysite/profile/{id}/edit (This is the URL you get when admin edit a user profile from user profile list.) I need to show the edit form in admin theme

I am using below profile module

version: '8.x-1.0-rc6'

core: '8.x'

project: 'profile'


The profile form is already designated as an admin route, so you just need to change the permissions for relevant roles so they can view that theme.

The specific permission you're looking for is:

View the administration theme

  • Site default admin (administrator role) itself is trying to edit the profile and the page opens in default theme instead of admin theme. Currently i have adjusted it by creating custom module and implement ThemeNegotiatorInterface to display admin theme for that URL. Not sure why its not working in default! Oct 9 '19 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.