Post by steelfight » Thu May 27, 2010 1:36 am

Hi everyone, Im currently creating a template, and I seem to be having a little bit of issues with the login/login out functions. What I want to do is have a top navigation menu, but instead of having the Login in it, I want to have that on the top right of the header. Theres when I get stuck, I know that in the default template changing from login to logout is within an IF. I just dont know how to make the change now, since it wont use a tab. Thanks.

Attachments

header.jpg

header.jpg (7.88 KiB) Viewed 3096 times


Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by steelfight » Fri May 28, 2010 12:30 am

Anyone ?

Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by steelfight » Sun May 30, 2010 4:10 am

Hi again. After messing with this issue for days, I sort of ended with the same results, a dead end. I know that this is the code that I need to work with

Code: Select all

    <div class="div4"><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
      <?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
      <a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></div>
    <div class="div5">
but I havent figure out how to change the location of the login/logout link. Any ideas ?

Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by delduvath » Sun May 30, 2010 4:15 am

Give me a link to your site and i'll look into it.

User avatar
New member

Posts

Joined
Thu May 20, 2010 11:22 pm
Location - Timisoara, Romania

Post by steelfight » Sun May 30, 2010 4:34 am

Hi delduvath, I have everything running in my computer. Will a screenshot work for you ?
I can also send you the psd.

Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by delduvath » Sun May 30, 2010 5:47 am

steelfight wrote:Hi delduvath, I have everything running in my computer. Will a screenshot work for you ?
I can also send you the psd.
Yep a screenshot is good too.

User avatar
New member

Posts

Joined
Thu May 20, 2010 11:22 pm
Location - Timisoara, Romania

Post by steelfight » Sun May 30, 2010 6:04 am

It will be something similar to this picture. I want the Login/logout link at the top right, instead of having it as a tab.

Attachments

header.jpg

header.jpg (12.24 KiB) Viewed 3052 times


Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by delduvath » Sun May 30, 2010 6:38 am

Hi there, sorry for the delay, i had some issue with xamp (weirdest error this week), anyway, what you need to do is:
cut the folowing code (found in catalog/view/theme/THEMENAME/template/common/header.tpl):

Code: Select all

<?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
And, create a new div before the div4, that contains the code mentioned, and from there you can name another class in your css, lets say div41 (copy the atributes from the div4 and edit from there), to make it align to the right side of your page, just set the div41's style "float:right;"

Code: Select all

<div class="div41" style="float:right;width:auto;"><?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?></div>
If i'd have your piece of code in front of me i could provide more help

Also as a bit of advice, pleeaase don't use that much of a glow on your buttons, and also easy on the bevel.
Less is definitely more!
Cheers, Deldu

User avatar
New member

Posts

Joined
Thu May 20, 2010 11:22 pm
Location - Timisoara, Romania

Post by steelfight » Sun May 30, 2010 10:07 am

Thanks for the reply Deldu :), I'll be working with that code and see how it goes. I'll post my results once I give it a shot.

Newbie

Posts

Joined
Thu May 27, 2010 1:07 am

Post by migz » Sun May 30, 2010 12:55 pm

thank you!

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am

Post by delduvath » Sun May 30, 2010 2:20 pm

you're both welcome :)

User avatar
New member

Posts

Joined
Thu May 20, 2010 11:22 pm
Location - Timisoara, Romania
Who is online

Users browsing this forum: Amazon [Bot] and 94 guests