Re: Hide if logged or not logged in
Hi COTC2001,
Do you know if your code below would work on the 4.1.9 version?
Thanks!
Quote:
Originally Posted by cotc2001
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
|
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
|