1
votes

i'm working on a Joomla web site where i would like to change the default authentication page.

i created a new login menu item and i've tried to hide the com content area so that the login form don't show. instead of the default login form i placed a new better looking login module. now i'm trying to make this page the default login page.

There are a couple areas in the site where access is restricted to registered users. and if clicked it leads to the default joomla login page. i want the user to be redirected to login from the new one.

can you please help?

1

1 Answers

9
votes

The easiest way to obtain your own custom login page is to override the default joomla layout template.

It's actually very easy to do.

Start with your template. In the template directories, you'll need to have an html folder in your template. Inside of that, you'll need a com_users directory, and inside of that - a login folder. Like this:

/templates/YOURTEMPLATE/html/com_users/login

Then, copy /components/com_users/views/login/tmpl/default_login.php into your new login folder you just created.

From here, you can customize the default_login.php file to your hearts content. Be sure to keep the field names and hidden fields intact - be sure to only manipulate layout elements and avoid changing anything to do with the form, form name, destination or fields.

You can do the same for the logout template - and as a bonus, it goes in the same folder in your template.