peeta Posted February 25, 2009 Share Posted February 25, 2009 I need to block some content in the client area from a few clients when they login and I tried using the client ID tags below but neither worked. {if client_id == '100'}show this{else}show this{/if} also tried {if $clientsdetails.id == '100'}show this{else}show this{/if} Can some one point me to the correct tag or method to achieve this? Thanks 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 25, 2009 Share Posted February 25, 2009 {if $_SESSION['uid'] == '100'}show this{else}show this{/if} 0 Quote Link to comment Share on other sites More sharing options...
peeta Posted February 25, 2009 Author Share Posted February 25, 2009 Sparky I get an error with that method Fatal error: Smarty error: [in newtmp/header.tpl line 71]: syntax error: unidentified token '['uid']' (Smarty_Compiler.class.php, line 1396) in /home/hosting/public_html/libs/Smarty.class.php on line 1095 I even tried it without the quotes and got the same error 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 25, 2009 Share Posted February 25, 2009 Well I'm a goose... thats a php variable... this will work but only on certain pages where clientsdetails variable is available {if $clientsdetails.id == '100'}show this{else}show this{/if} to get it for any page {php}$this->assign('gothim',$_SESSION['uid']);{/php} {if $gothim == '100'}show this{else}show this{/if} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.