# Email Element Visibility (advanced) (updated)
Visibility Conditions use simple logic expressions for rendering an element inserted into the editor. This is most commonly seen when Editing Emails and is represented by an "eye" icon at the right-side of the element.
An example email showing the visibility icons when in "edit" mode.
The Visibility flag ("eye" icon) will be color coded. The "green" flagged Visibility Conditions are editable, you can change the condition statement as needed whereas the "blue" flagged conditions are set by the platform and not directly editable. Hovering over the "blue" button will show a pop-up for the condition that is being used.
An example showing what visibility condition is being used when hovering over the "eye" icon.
Email Element Visibility - Table Of Contents
# Condition Statements (advanced)
The Condition Statements used for the Visibility property can be considered conditional
if statements. Where the condition being tested is either
false. Essentially, if the condition is
true the element will be visible and/or rendered appropriately based on the condition used.
# Variable Only Test
If a Variable Only Test is being performed it is testing to see if a value exists for the variable. The actual value itself is not relevant to the test, only that the value is not
null (or no value). If there is a value associated with the variable, the conditional test will return
true and the element will be displayed.
# Example: Variable Only Test
The use of the
HasTickets variable in this example case is testing a simple
false condition, Does the bidder have a ticket? If the answer is Yes the Divider element is displayed; if the answer was No the Divider element would not be displayed.
Tickets and Dividers have no specific connection although you can use the
HasTickets variable all the same as it is tested outside of the context of the element itself.
# Test For False
The default is to test for
true statements although you can test for
false statements by prepending the code-base variable with the logical not symbol
! (exclamation mark). For example,
!HasTickets would display the element if the bidder did not have a ticket for the event.
# Variable Value Test
When writing a Variable Value Test you still need to phrase the condition so it can be evaluated to a
true/false resolution. As an example, to test if the variable is
0 you would specifically state
variable_name === 0 where
variable_name is an accepted code-base variable.
# Test Multiple Variables
To Test Multiple Variables in the same condition statement you would use the logical and
&& (two ampersand symbols) to add each code-base variable into the statement.
Most programming "logic" operators can be used with Visibility Conditions by themselves or combined as needed.
# Code-base Variables (advanced)
This is a current short list of Code-base Variables you can see in action.
# Bidder Emails
ShowPaymentLink && Token.Url
ShowTaxDeductible && TaxDeductibleAmount
# Sponsorship Related Emails
HasSponsorship... is there a sponsorship.
SponsorshipPurchases... list of all sponosrships.
Sponsorship... first one (only one!) purchased.
# Online Bidding Emails
Auction.Options.IncludeItemImagesBidding(used for a block visibility)
# System Notifications
# Ticket Emails
Donation(which is any cash donation included)
Last Revised: July 2022