Hi all,
I'm trying to convert a lay-out made by a designer to drupal. I'm using PHPTemplate. The webdesigner created a loginform at the top of the page. The navigation for a user though, needed to be placed at the left of the site. Within drupal it seems that if you activate the login block, the placement you choose will be for the form as well as for the administer-block.
Therefore I created my own loginform within my page.tpl.php file. Like this:
<div id="inlog">
<form action="/drupal47/node?destination=node" method="post" id="user-login-form">
<input type="text" maxlength="60" class="form-text" name="edit[name]" id="edit-name" value="" />
<input type="password" maxlength="64" class="form-text" name="edit[pass]" id="edit-pass" />
<input type="submit" class="form-submit" name="op" value="inloggen" />
<input type="hidden" name="edit[form_id]" value="user_login_block" />
</form></div>
I found out that this would only work when the login block is enabled. That wasn't a problem, because I need the navigation after logging in. So I enabled the login block, and put it at the left sidebar.
Then I added this code to the head of my page.tpl.php:
<?
global $user;
if ($user->uid ==0){
?>
<style>
.block-user {
display: none;
}
</style>
<?
} else {
?>
<style>
.block-user {
}
</style>
<?}?>
This way, the loginform won't show up, and the administer menu will.