Add ##ELSEIF##, ##AND##, or an ##OR## to Merge Syntax (40)
Have merge code functionality contain ##ELSEIF##, ##AND##, or ##OR## conditions
4
-
All ##IF merges support ##ELSE logic, but not ##ELSEIF which forces you to duplicate similar merges onto the page and have multiple fallback ELSE statements. So good idea. ##AND & ##OR options could be tricky. We've been torn over adding this. 0 -
Hi Edward, It would be great to see the Merge codes be developed to have more options. I've see these used in platforms which allow for nested merge codes and allow AND OR statements. It looks pretty much like a program routine. Also, build merge codes which represent if some value exists. This is very powerful. Example: [If PRODUCTREVIEWEXIST] Hi all! Read all of our wonderful reviews here. [/If] [If PRODUCTSHORTDESCRIPTIONEXIST] Display whatever html here if condition is met. [/If] This opens up many possibilities for custom site layouts as these tags get built out. Is a product on sale? Tag drops a big sale image on the product page. Does product contain multiple images? Tag shows a message on page "Be Sure to Check Out the Additional Images". Just some examples how this can be used. 0 -
It would be great if conditionals could be nested AND/OR basic boolean logic... AND NOT (or !) added to conditionals... There are times when I want to serve content ONLY to customers that are NOT logged in AND if not logged in AND cart is not empty, then serve content. BUT if logged in, don't serve. But we can't nest or combine conditionals. A perfect use of this logic would be for an exit-intent popup. IF customer is logged in: don't do anything IF customer is not logged in: (if cart is empty, serve content A) (if cart is not empty, serve content B) ##ENDIF## This is so incredibly powerful, adding nesting and boolean would take it to another level. Thanks for listening. 0 -
If I could place all 20 of my votes to this, I would. This would make your software super powerful and customizable. Please implement :) 1 -
Also make the IF statement more flexible to test other things such as > more than, < less than, <> is not 1 -
This seems like a PHP 101 moment. You need OR and NOT, or at the least a SWITCH structure. 0 -
ELSEIF would be awesome!
0
Please sign in to leave a comment.
Comments
7 comments