Snippet and article editing - Paperight/website GitHub Wiki

We can change the wording on paperight.com by editing snippets and articles in /server.

Email snippets

Emails work slightly differently to normal content. this is because they use a special templating engine called Velocity, which uses a "model" to populate variables. (Unlike for instance the payment-confirmation, where we had to invent tags like [$transactionReference$].)

The "models" available in the emails closely follow the db, e.g.:

  • there is a field called "lastName" in the 'User' table, so you can use "$user.lastName"
  • there is a field called COMPANY_ID in the 'User' table, and a field 'phoneNumber' in the 'Company' table, so you can use "$user.company.phoneNumber"