How can we help?

Listed below are additional filters. See more filters here, however please keep in mind that not all Liquid filters work in Rallybound's system. 

Filters listed on this page:

  • date
  • default
  • exists
  • money
  • name

date

Converts a timestamp into another date format.

Input

{{ Campaign.Event_Date | date: "%B %d, %Y" }}

Output

January 1, 2020

date accepts the same parameters as Ruby's strftime method. You can find a list of the shorthand formats in Ruby's documentation or use a site like strfti.me.

default

Sets a default value for any variable with no assigned value. Can be used with strings, arrays, and hashes.

The default value is returned if the variable resolves to nil, false or an empty string "". A string containing whitespace characters will not resolve to the default value.

Input

Dear {{ Donor.First_Name | default: "donor" }},

If the donor has no first name, the output will be:

Output

Dear donor,

exists

Checks to see if the object or attribute exists. Does not work on all objects. Use this filter in an if tag to add content that should appear if the object or attribute exists:

Input

{% if Team | exists %}
Invite team members for a successful campaign!
{% else %}
Thank you for your support.
{% endif %}

If the user is on a team, the output will be:

Output

Invite team members for a successful campaign!

If the user is not on a team, the output will be:

Output

Thank you for your support.

money

Returns a number in monetary format.

Input

{{ Donation.Amount | money }}

Output

$54

The number of decimal places can be defined by appending a number to the filter. For example:

Input

{{ Donation.Amount | money, 2 }}

Output

$54.00

name

Returns the user's full name (first and last). If there is no name listed, it will return the company name. Only works for fundraisers, not donor-only or org-level users. 

Input

{{ User | name }}

Output

John Doe