♥Vger Posted August 6, 2004 Posted August 6, 2004 I have been trying to move the Login function from the page to the header file, to work with the logout link. So, when someone first arrives they see the Login link in the header, and once they've logged in they see the Logout link in the header - but I can't get it to work. I've searched 'contributions' and can't seem to find anything there. Does anyone know how to do this, or can anyone point me to a contribution that will help? Many Thanks - Vger
Guest Posted August 6, 2004 Posted August 6, 2004 BACK UP 1st then Change this <td align="right" class="headerNavigation"> <?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> To this the red is the difference <?php if (tep_session_is_registered('customer_id')) { ?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> <? } else { ?> <a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN; ?></a> } ?>
♥Vger Posted August 6, 2004 Author Posted August 6, 2004 Many thanks for that, it works nicely! I knew it was a variation on the 'else' command, but wasn't sure about how to insert it. I was trying to make it work with 'if' something 'else' something different. It would have helped if I had remembered the curly brackets too! Again - many thanks - Vger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.