X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Check if not logged in and $main is... (https://forum.x-cart.com/showthread.php?t=51250)

nck-k 12-11-2009 12:40 AM

Check if not logged in and $main is...
 
Hi,

I am trying to create an if statement that will check if the visitor is not logged in and the page he is visiting not equals a static page or a help page, but i can't get it to work:

Code:

{if $login eq "" && ($main ne "pages" || $main ne "help")}
do something 1
{else}
do something 2
{/if}


I have tried several ways, but this codes looks like the logical one for me.
Can someone help me?

cflsystems 12-11-2009 05:24 AM

Re: Check if not logged in and $main is...
 
Try {if $login eq "" && $main ne "pages" && $main ne "help"}

nck-k 12-14-2009 04:03 AM

Re: Check if not logged in and $main is...
 
Quote:

Originally Posted by cflsystems
Try {if $login eq "" && $main ne "pages" && $main ne "help"}


Thank you, it works for me!


All times are GMT -8. The time now is 07:22 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.