Topic: How to arrange the <!-- IFs --> in this case
Hi,
I've been trying with different arrangement for the <!-- IFs --> tags but still couldn't get it right.
What I'm trying to do is this:
When a user hasn't login -
1) To display a Member Login Form Div1.
After a user has loggedin -
2) To display a Div2 with "Welcome User Message + You have {number} new messages."
OR
3) To display a Div3 with "Welcome User Message + You have NO new messages."
I've tried the following but it either isn't displaying Div2 or isn't reflecting the {number} of new messages which I'm unsure of:
<!-- IF loggedin == "0" -->
<div><form> Display Member Login Form Here </form></div>
<!-- ENDIF -->
<!-- IF loggedin == "1" -->
<!-- IF loggedin_newmessages > "1" -->
<div> Welcome {loggedin_username}, you have {loggedin_newmessages} new message(s)!</div>
<!-- ELSE -->
<div> Welcome {loggedin_username}, you have 0 new messages</div>
<!-- ENDIF -->
<!-- ENDIF -->
Try out here:
http://www.thaidatelink.com
User: demo
Pass: demo