devilsown Posted May 1, 2011 Share Posted May 1, 2011 I am trying to make a button that changes state depending on log in or loged out. But i have little idea what i am doing. I would apreciate your help. {if (!$params['cookie']->isLogged()) return getPageLink('index.php')}?mylogout" title="{l s='Logout'}">{l s='Logout'}; } Link to comment Share on other sites More sharing options...
devilsown Posted May 2, 2011 Author Share Posted May 2, 2011 Thanks for your help. Now i have 1 less thing left to do and my site will be ready to go live. www.devilsowninjection.com Link to comment Share on other sites More sharing options...
Marexion Posted August 12, 2011 Share Posted August 12, 2011 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" /> {else} <a href=".." id="state2" /> {/if} 1 Link to comment Share on other sites More sharing options...
ricky11 Posted January 25, 2013 Share Posted January 25, 2013 Hi Marexion, I am trying to do the same, thing, do i make the change in blockuserinfo.tpl I am trying to hide the "add to cart" button as well as the "cart info" in header. but where would i put the if statement code? Thanks. Link to comment Share on other sites More sharing options...
PotionsFactory Posted January 27, 2013 Share Posted January 27, 2013 I am trying to hide the "add to cart" button as well as the "cart info" in header. but where would i put the if statement code? Thanks. Are you using the default theme? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now