Usage:

With this shortcode, tag-based decisions can be taken similar to PHP’s SWITCH..CASE…DEFAULT .

This shortcode can be used instead of using a series of [mbr_is_for] shortcodes, making your code both shorter and easier to manage.

This shortcode does NOT support conditional branching with [ELSE_casetag].
Shortcode nesting is NOT supported.

Parameters:

Tag ID’s vs. tag names:
We encourage the use of tag ID’s over tag names. Unless a tag is deleted, its tag ID can be considered persistent. Tag names, on the other hand, can be changed any time. Using a tag name that has been changed can lead your shortcode, hook or module to no longer work as expected.
limit_else:
If used and set to “yes” and the user is not logged in or does not have any “membership tags”, this parameter will cause the “ELSE” part of the shortcode to be suppressed This “condition within the condition” can be useful in some scenarios where the “ELSE” portion of the shortcode is only applicable to members of the site only, for example excluding visitors who are not logged in.
Default: ‘no’.
Required: no.

Note: this parameter must be used in the shortcode tag itself and not in the body of the tag, as is the case with the other parameters.

tag: Specifies a condition where the specific matching tag ID/tag name would be considered a match. This condition can be used multiple times.
Default: none.
Required: no.
any_tags: Specifies a condition where ANY matching tag ID’s/tag names would be considered a match.  This condition can be used multiple times.
Default: none.
Required: no.
all_tags: Specifies a condition where ALL provided tag ID’s/tag names must match to be considered ‘true’. This condition can be used multiple times.
Default: none.
Required: no.
not_tag: Specifies a condition where not matching the specific tag given tag ID/tag name would evaluate to ‘true’.  This condition can be used multiple times.
Default: none.
Required: no.
not_any_tags: Specifies a condition where not matching ANY of the given tag ID’s/tag names would evaluate to ‘true’. This condition can be used multiple times.
Default: none.
Required: no.
not_all_tags: Specifies a condition where not matching ALL of the given tag ID’s/tag names would evaluate to ‘true’.  This condition can be used multiple times.
Default: none.
Required: no.
else: Specifies the default fallback case if no other condition is met. This default branch can only be used once.
Default: none.
Required: no.

Example:

[mbr_casetag]
  tag: 195
    You have the tag ID 195
  not_tag: MyTagName
    You do not have tag MyTagName
  not_tag: MyTagName3
    You do not have tag MyTagName3
  any_tags: 987,MyTagName2
    You have at least one of the given tags.
  any_tags: 998, 999
    You have at least one of the given tags.
  not_any_tags:MyTagName3,234
    You do not have at least one of the given tags.
  all_tags: 678,MyTagName4,591
    You have all the given tags.
  all_tags: 543,432,MyTagName4
    You have all the given tags.
  not_all_tags: MyTagName5,MyTagName6
    You do not have all the given tags.
  else:
    None of the above applied to you.
[/mbr_casetag]
[mbr_casetag limit_else='yes']
  tag: 195
    You have the tag ID 195
  not_tag: MyTagName
    You do not have tag MyTagName
  not_tag: MyTagName3
    You do not have tag MyTagName3
  else:
    None of the above applied to you.
[/mbr_casetag]

API:

There is currently no ActiveMember360 API function equivalent for this shortcode.