Skip to main content

Objects and attributes

Attributes of the objects passed to templates.

organization​

FieldDescription
nameorganization name
legal_namelegal name
domainsite subdomain
currencycurrency (e.g. EUR)
contact_emailcontact email
sender_emailsender email
contact_phonecontact phone
citycity
stateprovince
postal_codepostal code
countrycountry
vatVAT number
tax_identification_numbertax code
privacy_policyprivacy policy
tosterms of service
logologo
base_site_urlsite base URL
base_site_fqdnfull site domain
is_developmenttrue in development environment

campaign​

FieldDescription
ididentifier
titletitle
contentcontent (HTML)
covercover image (URL)
slugslug in the URL
seo_titleSEO title
seo_descriptionSEO description
urlcampaign URL
allow_peer_to_peerpeer-to-peer fundraising enabled
is_leadLead-type campaign
is_goal_enabledgoal active
goalgoal amount
goal_percentagepercentage reached
total_donatedtotal raised
total_donationsnumber of donations
total_supportersnumber of supporters
required_fieldsrequired checkout fields
shown_fieldsfields shown in the checkout
cost_examplescost examples (see below)
public_donationspublic donations (see below)
customfieldscustom fields (see Custom fields)
commentslist of comments (see below)
peer_campaignslinked peer-to-peer fundraisers
<h1>{{ campaign.title }}</h1>
{{ campaign.total_donated | format_money }} raised out of {{ campaign.goal | format_money }}
{% for donation in campaign.public_donations %}
{{ donation.supporter.full_name }} - {{ donation.amount | format_money }}
{% endfor %}

campaign.cost_examples​

FieldDescription
uuididentifier
amountamount
namename
descriptiondescription
imageimage (URL)
monitor_quantitytracks available quantity
quantitytotal quantity
available_quantityavailable quantity

campaign.comments​

FieldDescription
messagecomment text
create_datecreation date
supporter_namesupporter name
supporter_imagesupporter image
donation_amountdonated amount
anonymousanonymous comment

peer_campaign​

FieldDescription
ididentifier
titlefundraiser title
supporter_imagepromoter image; if the fundraiser has none, the supporter's
supporter_namepromoter name
slugslug in the URL
custom_messagecustom message
goalfundraising goal
is_goal_enabledgoal active
goal_percentagepercentage of the goal reached
supporterpromoter supporter
urlfundraiser URL
update_url_v2URL of the edit view v2, under the campaign (campaigns/<slug>/<peer_slug>/update/v2/)
manage_urlURL of the detail page inside the supporter area (/my/campaigns/<id>/): where the theme links point
campaignlinked campaign
statsstatistics (amount, total_donations, total_supporters)
total_donatedtotal raised by this fundraiser (same as stats.amount)
total_donationsnumber of donations of this fundraiser
total_supportersnumber of supporters of this fundraiser
public_donationspublic donations of this fundraiser (same shape as campaign.public_donations)
commentsmessages left on this fundraiser (same shape as campaign.comments)

The last five fields have the same names as the campaign ones: a peer page can read the figures from a single object, as in the example below.

comments is a generator, as in campaign: to know whether there are messages, convert it once with |list instead of testing it directly.

{% set donations_source = peer_campaign or campaign %}
{{ donations_source.total_donated | format_money }} raised
{% for donation in donations_source.public_donations %}
{{ donation.supporter.full_name }} - {{ donation.amount | format_money }}
{% endfor %}

page / blog / article​

FieldDescription
ididentifier
titletitle
contentcontent (HTML)
covercover image (URL)
slugslug in the URL
seo_titleSEO title
seo_descriptionSEO description
create_datecreation date
update_dateupdate date

In addition blog has articles (its articles) and article has blog (the blog it belongs to).

project​

FieldDescription
ididentifier
titletitle
contentcontent (HTML)
covercover image (URL)
slugslug in the URL
seo_titleSEO title
seo_descriptionSEO description
campaignsproject campaigns

supporter / donation​

supporter:

FieldDescription
idsupporter id
first_namefirst name
last_namelast name
full_namefull name
emailemail
phonephone
addressaddress
citycity
localitylocality
postal_codepostal code
countrycountry
ssntax code
imageimage (URL)
email_marketingemail consent
phone_marketingphone consent
sms_marketingSMS consent
postal_marketingmail consent

donation:

FieldDescription
iddonation id
amountamount
supportersupporter
campaign_titlecampaign title
create_datedonation date
messagemessage
publicpublic donation

menu:

FieldDescription
namemenu name
handlemenu handle
menu_itemsmenu items

Menu item:

FieldDescription
labellabel
linkdestination
typetype (homepage/page/blog/campaign/project/external)

The URL of an item is resolved with the {% nav %} tag (see Tags and filters).