Announcement

Collapse
No announcement yet.

XOR Conditional

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    XOR Conditional

    I don't want to display a link to create a new account if the customer is on the ACAD page or if they are already a customer.

    How do you create an XOR conditional?
    http://www.alphabetsigns.com/

    #2
    Re: XOR Conditional

    Hi,

    You can create an XOR condition something like this :

    Code:
    <MvASSIGN NAME = "l.a" VALUE = "1" />
    <MvASSIGN NAME = "l.b" VALUE = "2" />
    
    <MvIF EXPR = "{ (l.a EQ 1 OR l.b EQ 1) AND NOT (l.a EQ 1 AND l.b EQ 1) }">
        <MvEVAL EXPR = "'I just applied XOR'" />
    </MvIF>
    Although, I think (if I'm getting it correctly), a simple OR condition should be enough for your particular use case.
    Rajnish Sinha
    ---------------------
    https://twitter.com/rajnishsi

    Comment


      #3
      Re: XOR Conditional

      @rajnishsi

      Thank you for the AND NOT, that did it.

      Code:
      <mvt:if expr="(NOT(g.Screen CIN 'ACAD') AND NOT(g.customer:id))">
          <li class="menu-list"><a href="&mvte:urls:ACAD:secure;">Create Account</a></li>
      </mvt:if>
      http://www.alphabetsigns.com/

      Comment

      Working...
      X