Array filters change the output of arrays and/or return specific content in the array. See more array filters here, however please keep in mind that not all Liquid filters work in Neon Fundraise's system.
Filters on this page:
- all_info
- contact_info
- field_by_api_name
- field_by_label
- first
- last
- list
- map
- term_by_name
all_info
Returns a pre-formatted text block pulled from the array information. This filter works on the following Neon Fundraise arrays:
- Roles
- Registration Fields
- Tickets
Roles
On the Roles
array, all_info
returns names and field information for all the roles purchased/reserved in the relevant transaction.
{{ Roles | all_info }}
Fundraiser
Goal Amount: $500
Attendee
T-shirt size: M, Age: Over 18
Registration Fields
On the Registration_Fields
array, all_info
returns names and field information for all the registrations in the relevant transaction.
{{ User.Registration_Fields | all_info }}
Registration Type: Walker
T-shirt size: Medium
T-shirt color: Blue
Tickets
On the Tickets
array, all_info
returns ticket count, names and field information for all the tickets purchased/reserved in the relevant transaction.
Your tickets:{{ Tickets | all_info }}
Your tickets:
Adult (2)
Meal Preference: Chicken, Seating Preference: None
Meal Preference: Vegan, Seating Preference: Yes
Child (1)
Meal Preference: Kid Meal, Age: Under 5
contact_info
Returns a pre-formatted text block pulled from the array information. This filter works on the Captain
array, for which it displays the full name (or company if first/last aren’t applicable) and email address of each team captain:
For more information, contact:{{ Team.Captains | contact_info }}
For more information, contact:
John Doe, john@doe.com
Jane Doe, jane@doe.com
field_by_api_name
Returns the value of any custom field, identified by the api name. Identifying by the api name ensures that the correct field is referenced, being that unique api names are required for custom fields.
Custom fields exist on the following Neon Fundraise objects:
- Campaign
- User
- Team
- Role
- Donation
- Notification
- Ticket
{{ User | field_by_api_name: "tshirtsize" }}
Medium
field_by_label
Returns the value of any custom field, identified by the field name. See field_by_api_name
above for a list of objects with custom fields.
{{ User | field_by_label: "What is your t-shirt size?" }}
Medium
first
Returns the first item of an array.
{{ "Ground control to Major Tom." | split: " " | first }}
Ground
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}
zebra
You can use first
with dot notation when you need to use the filter inside a tag:
{% if my_array.first == "zebra" %}
Here comes a zebra!
{% endif %}
last
Returns the last item of an array.
{{ "Ground control to Major Tom." | split: " " | last }}
Tom.
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.last }}
tiger
You can use last
with dot notation when you need to use the filter inside a tag:
{% if my_array.last == "tiger" %}
Here comes a tiger!
{% endif %}
list
Returns an array of values in comma delimited format. If there is only one value, it returns the single value. If there are two values, they are separated by "and". If there are three or more values, they are comma separated, with the last item preceded by "and".
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array | list }}
zebra, octopus, giraffe, and tiger
map
Creates an array of values by extracting the values of a named property from another object. A use case for this is to extract and display all the donor names from an array of donations, as in the case of donation matching:
Your donation was matched by {{ Matching_Donations | map: "Donor_Display_Name" | list }}.
Your donation was matched by John Hamm and Stephanie Warbler.
term_by_name
Use the filter term_by_name on the Campaign.Terms object to access any dictionary term in the campaign. This filter is most commonly used to place any of the global terms listed below, which are editable in the Admin Panel, under Campaign Dictionary. The terms listed below are identified by their default value in italics, while the actual term label that should be used with the term_by_name filter is in bold.
-
The term for attendee is Global_MemberAdjective2
-
The term for blog is Global_BlogAdjective
- The term for captain is Global_CaptainNoun
- The term for event or campaign is Global_EventAdjective
- The term for participant is Global_MemberAdjective
- The term for personal fundraiser is Global_PersonalFundraisersAdjective
- The term for team is Global_TeamAdjective
- The term for team in plural is Global_TeamAdjective_Plural
- The term for ticket is DonationTicketNoun
- The term for user is Global_UserAdjective
Below is an example of this filter in use:
Join My {{ Campaign.Terms | term_by_name : "Global_TeamAdjective" }}
Join My Team