Answer the question
In order to leave comments, you need to log in
How to make a Drupal 7 user menu?
Hello.
I decided to learn Drupal, and started by creating a template.
And for several hours now I have been looking for information about the layout of the User menu block .
Initially, I made a region, I placed the blocks User menu and Login to the site in it .
For the "Login to the site" block, I created the file block--user--login.tpl.php and added to it
<form accept-charset="UTF-8" method="post" action="/node?destination=node">
<div class="login">
<span>Логин:</span>
<input type="text" name="name">
</div>
<div class="password">
<span>Пароль:</span>
<input type="password" name="pass">
<input type="hidden" value="" name="form_build_id">
<input type="hidden" value="user_login_block" name="form_id">
</div>
<div class="abutton">
<input type="submit" value="Вход" name="op">
<div class="aurl">
<a href="/user/register">Регистрация</a><br />
<a href="/user/password">Забыли пароль?</a>
</div>
</div>
</form>
<?php if(!$logged_in): ?>
//код выше
<?php else: ?>
<a href="/user/logout">Выйти</a>
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question