Jump to content

Login button if not logged in logout buttin if logged in help please


Recommended Posts

  • 3 months later...

I am trying to make a button that changes state depending on log in or loged out. <br/><br/><br/>But i have little idea what i am doing. I would apreciate your help. <br/><br/><br/> {if (!$params['cookie']->isLogged())<br/> return <li class="first active"><a >getPageLink('index.php')}?mylogout" title="{l s='Logout'}">{l s='Logout'}</a></li>;<br/> }





when you are working in .tpl files u can use {if $logged} to determine if a user is logged in. i use this to determine if a user may view the shopping cart or not depending on if they are logged in or not.


{if $logged}

<a href=".." id="state1" />


<a href=".." id="state2" />


  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...