I’m trying to use this to determine what banner to present depending what section you are in. Say I want IDs 14-16 (14 is parent)to show a certain banner, I want 12 (parent) and 27-33 (children) to show another. All other pages show the default banner.
The following almost does it. The problem, though, is that the parents get excluded:
[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`12` &then=`[[$sub-banner-1]]`]]
[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`14` &then=`[[$sub-banner-2]]` &else=`[[$sub-banner-default]]`]]
The other situation is that I end up with IDs 12 and 14 meet 2 criteria and then display 2 banners.
[[!If? &subject=`[[*id]]` &operator=`eq` &operand=`12` &then=`[[$sub-banner-1]]`]]
[[!If? &subject=`[[*id]]` &operator=`eq` &operand=`14` &then=`[[$sub-banner-2]]`]]
[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`12` &then=`[[$sub-banner-1]]` &else=`[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`14` &then=`[[$sub-banner-2]]` &else=`[[$sub-banner-default]]`]]`]]
Nesting the calls results in the same as above:
[[!If? &subject=`[[*id]]` &operator=`eq` &operand=`12` &then=`[[$sub-banner-1]]` &else=`
[[!If? &subject=`[[*id]]` &operator=`eq` &operand=`14` &then=`[[$sub-banner-2]]` &else=`
[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`12` &then=`[[$sub-banner-1]]` &else=`
[[!If? &subject=`[[*parent]]` &operator=`eq` &operand=`14` &then=`[[$sub-banner-2]]` &else=`[[$sub-banner-default]]`]]`]]`]]`]]
I know there are other ways to do what I am trying to do but i just want to see if I can do it with conditional statements.
The problem is with my own logic. Either it is not possible to meet all the conditions with this plugin or my logic is off and just haven’t thought of the right sequence or method.
Thanks in advance...