How to create template of user register, login and forget password in drupal 8 can we create template same as we created earlier in drupal7 ?

I want to open these forms in popup on clicking links

2 Answers 2


Yes it same as drupal 7.

For example:

We are using page--user--register.tpl.php for registration page template in D7. In D8 changed to twig extension page--user--register.html.twig.

You can enable debug mode in D8 so you can easily see the twig file need to use in your case. You can refer Drupal 8 custom page template to see how to enable debug mode.

enter image description here

Some links how to override the template files.




  • 1
    can we create template as user_login_form.html.twig except page--user--register.html.twig,if its possible so how to proceed
    – user59414
    Commented Nov 15, 2016 at 10:06
  • 1
    Yes you need to check how to add a custom template file for user registration.
    Commented Nov 15, 2016 at 10:09
  • 1
    do you have any link ?
    – user59414
    Commented Nov 15, 2016 at 10:11
  • 3
    This link give you an idea how to override a template drupal.org/docs/8/theming/twig/working-with-twig-templates
    Commented Nov 15, 2016 at 10:18
  • 1
    one more thing we use this code in drupal 7 for creating custom template 'user_login' => array( 'render element' => 'form', 'template' => 'templates/user-login', ),
    – user59414
    Commented Nov 15, 2016 at 11:55

for your case answer is page--user--register.html.twig, but generally, you can use below twig template naming suggestions:


I suggest you use page--user.html.twig, for all of these pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.