1

I want to change default login page to html login page because I like the theme (bought theme but still in html). After googling: 1. I use bluemarine theme, as a start i modify page.tpl.php and replace all html parts 2. Place assets folder in the "themes/bluemarine" folder and replace "assets/.." to "themes/bluemarine/assets/..", until this step login page has been changed flawlessly

But, I don't know how to routing login page to normal destination. In the html code in point 1, I changed this:

"<form class="login-form" action="index.html" method="post">

to this one:

<form class="login-form" action="?q=dashboard" method="post">

Because I have a custom module called dashboard.

Please help me, thanks before...

0

You shouldn't be replacing Drupal form code with static HTML code for various reasons. You can redirect users to specific URLs by using Rules or actions/triggers:

https://www.drupal.org/node/683696

  • Any good ways how to convert static html login page to drupal form code? – bandungeuy Mar 14 '16 at 19:39
  • BTW, now I couldn't login to admin area. – bandungeuy Mar 14 '16 at 19:40
  • Instead of altering the form code, you should theme around the elements that you need to change. The Form API is doing a lot for you, including validation and submission (registering and logging in the user). You can test this by simply going to /user or using the user login block provided by Drupal to test that logins actually work before making any modifications. Do that first, and ensure the Action/Trigger is properly redirecting to 'dashboard' on login. – Kevin Mar 14 '16 at 19:51

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.