1

how can I create twig template for user login form page: /user/login
Is there any Twig Template naming suggestion for that?
thank's for any help.

2 Answers 2

4

Use page--user--login.html.twig for targeting user/login page.

You can also enable Twig debugging to see naming suggestions for different page components.

The markup of each Twig template is surrounded by HTML comments that contain theming information, such as template file name suggestions.

2
  • Thank you so much for taking the time to help out- I appreciate it greatly, but I want to understand more about parameters that I can put in this page to achieve my demanded. thanks for every thing again. Aug 13, 2016 at 15:08
  • @MojtabaReyhani, your question specifically states naming suggestion for "user/login" page template. You can ask a new question about parameters that you're interested in learning. Otherwise a continuous expansion of the original question deviates from the Q&A format.
    – oksana-c
    Aug 13, 2016 at 22:41
0

You can use below twig template naming suggestions:

  • page--user.html.twig
  • page--user--login.html.twig
  • page--user--password.html.twig

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

Your Answer

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

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