# Visibility Conditions
Using the Visibility property for an element is consider an Advanced Use of the editor and should be carefully considered and documented appropriately.
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.
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.
This is not currently supported in the website editor.
# Condition Statements
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.
# 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.
Note: 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
This is a current short list of Code-base Variables you can see in action.
# Bidder Emails
ShowPaymentLink && Token.Url
ShowTaxDeductible && TaxDeductibleAmount
# Ticket Emails
# Online Bidding Emails
Auction.Options.IncludeItemImagesBidding(used for a block visibility)
# System Notifications
Donation(which is any cash donation included)