View Single Post
  #1  
Old 10-04-2004, 01:39 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default Hide if logged or not logged in

Ok it's my turn to answer a question today

im trying to hide or show certain tabs depending on if the user is logged in or not logged in.

for example I have 4 tabs in the template "LOGIN / REGISTER, YOUR ACCOUNT, RECOVER PASSWORD & ORDER HISTORY"

if not logged in only "LOGIN / REGISTER" & " RECOVER PASSWORD" should be shown if LOGGED IN only "YOUR ACCOUNT" & "ORDER HISTORY" should be shown.

i've managed to hide the tabs I want to hide when logged in but I cant work out how to hide the tabs when NOT logged in

this is the code i've got so far

Code:
<table class"HeadLine" border="0" cellspacing="0" cellpadding="0"> <tr> {if $login eq ""} <td>[img]{$ImagesDir}/accountnavlcorner.gif[/img]</td> <td bgcolor="#000000"><span class="TopBannerItems">{$lng.lbl_your_profile}</span></td> <td>[img]{$ImagesDir}/accountnavrcorner.gif[/img]</td> <td>[img]{$ImagesDir}/spacer.gif[/img]</td> <td>[img]{$ImagesDir}/accountnavlcorner.gif[/img]</td> <td bgcolor="#000000"><span class="TopBannerItems">{$lng.lbl_recover_password}</span></td> <td>[img]{$ImagesDir}/accountnavrcorner.gif[/img]</td> <td>[img]{$ImagesDir}/spacer.gif[/img]</td> {/if} {if $usertype eq "C"} <td>[img]{$ImagesDir}/accountnavlcorner.gif[/img]</td> <td bgcolor="#000000"><span class="TopBannerItems">{$lng.lbl_orders_history}</span></td> <td>[img]{$ImagesDir}/accountnavrcorner.gif[/img]</td> <td>[img]{$ImagesDir}/spacer.gif[/img]</td> {/if} <td></td> </tr> </table>

i know it's something simple i've missed but the question is what???

Cheers for any help

THIS IS FOR VERSION 4.0.3
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote