I’ve created a website based on a Drupal 7 Zen subtheme and now I would like to create a login page for the administrator. When I navigate to http://mysite.com/?q=user, I return to the main page as specified in the page.tpl.php file. I would like to have a manual login page, so I tried following the following tutorial: https://drupal.org/node/350634. My template.php looks like this:
function camuse_theme() { $items = array(); $items['user_login'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'camuse') . '/templates', 'template' => 'user-login', 'preprocess functions' => array( 'camuse_preprocess_user_login' ), ); return $items; } function camuse_preprocess_user_login(&$vars) { $vars['intro_text'] = t('This is my awesome login form'); }
And my user-login.tpl.php file like this:
<p><?php print render($intro_text); ?></p> <div class="camuse-user-login-form-wrapper"> <?php print drupal_render_children($form) ?> </div>
However, when I navigate to http://mywebsite.com/?q=user, I still go to the home page. I don’t know what I’m doing wrong here, I’ve checked the names and everything seems fine. Could anyone help me with this?