How to override the user login.blade.php

  • I have created a new theme.

    When I change the theme and go to the login page the page is broken because of the User module login.blade.php loads by default.

    I also want to use another login.blade.php.

    Where should I keep the login.blade.php so that when I change the theme that login.blade.php will load.

    Thank you in advance.

  • Global Moderator


    You should mimic the same folder structure in your theme as in Flatly theme to ensure everything works out of the box.
    This is also usually default route to take, you copy Flatly theme and then modify it as you need.

  • Hi Armababy,
    I think you didn't get my point.
    In flatty theme also there are no login.blade.php. I want to use different HTML than the default login.blade.php.
    I have made a duplicate of the fatty theme and then modified the CSS and js. The page still breaks because of the CSS issues.

    Hope you get my point.

  • Global Moderator


    Okay, i think I get what you mean.
    For this purpose you could take advantage of this feature we pushed some time ago.

    What would you do is enable at what location you would like to rewrite views at (for example in your case frontend-theme set to true).
    Then go into Modules/User/Resources/views and copy everything to your Themes views/modules/user/ and now system should choose those views in your theme instead of Asgards User module views.

    Is this what you were looking for?


  • Yes, I am looking to have this exact feature, but after making the changes, the view is still loading from the User module. Do I have to make some other changes as well?

  • Global Moderator


    Sorry forgot to mention (developed it some time ago), already forgot.
    You have to enable this also for theme overrides.
    This setting is separated for only 1 reason so people accidentally do not enable this as for the core it adds about 15ms-30ms in load time.

  • Hi,
    It worked. Thank You for your time.

Log in to reply

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.