[Version 2] Donation Directives

We have two directives for donations, one for your donation form and another to show a stream of donations.

Donation Form

<donate-form 
  profile-id='johnday'
  fixed='{amount:25, description:"Registration"}'
></donate-form>

The <donate-form> directive renders a donation form. In your theme templates, the rendered result is editable in the file Donate/Form.

Attributes

  • profile-id required / stringThe profile ID for the donations list
  • fixed optional / objectAllows the donation form to be used to pay a set amount rather than a free donation, for example, for fixed donations on event registrations. The fixed object should have an amount and a description.

Donations

<donations 
  profile-id="johnday"
  heading="Latest Donations"
  truncate="30"
  sort="createdAt"
  order="desc"
  max="5"
  offset="0"
></donations>

The <donations>  directive renders a list of donations associated with a profile. In your theme templates, the rendered result is editable in the file Donate/Donations.

Attributes

  • profile-id optional / stringThe profile to show donations from. If left blank this will show donations across the whole site.
  • heading optional / stringA heading to show at the top of the donation stream.
  • truncate optional / numberThe character count to truncate donation messages at.
  • sort optional / stringHow to sort the list of donations. This can be almost anything, but common ones are total and createdAt . You can't sort on a public or private field.
  • order optional / stringdesc or asc are allowed here.
  • max optional / numberThe limit of donations to show. We do paginate this list.
  • offset optional / numberHow many donations from the start to skip. We use this for pagination.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us