Your templates can now use anything from the page you're writing on, like an order number, a job title, or a customer's name.

Variables like {{to.first_name}} or {{subject}} let your templates use details about the message you're writing. Anything else on the page, like the order in your helpdesk or the candidate in your applicant tracking system, had to be copied and pasted by hand.

The new css helper lets your templates read from the page itself. It's one of the larger additions to templates since template helpers, and the first of a few related features we're working on. Point your template at the part you need once, and Briskine fills it in every time you insert the template.

Anything you can see on the page

  • Text, like a name, a price, or a status.
  • Links, like the address of a profile or a product.
  • Form fields, with whatever is typed in them, even if it hasn't been saved yet.
  • Checkboxes, radio buttons, and dropdowns, with whatever has been picked.
  • Lists, like every item in an order.

The page is read when you insert the template, so you always get what's on it at that moment.

Choose what to insert with a CSS selector

You pass the css helper a CSS selector for the part of the page you want. For example, .job-title points at the element with the job-title class:

Thanks for applying for the {{css ".job-title"}} role.

If the page is a job posting for a Marketing Manager, your message says "Thanks for applying for the Marketing Manager role."

To find the selector, right-click the text on the page, choose Inspect, and look for the class or id of the highlighted element. Put a . in front of a class, or a # in front of an id.

Works with your other helpers

You can combine the css helper with the helpers you already use, like capitalizing a name that's written in lowercase on the page:

Hi {{capitalize (css ".customer-name")}},

Or using if to only mention something when it's on the page:

{{#if (css ".discount")}}
Your discount of {{css ".discount"}} has been applied.
{{/if}}

When there's no discount on the page, the line is left out, so the same template works whether or not the customer has one.

For more examples, see Page Helpers in the Briskine Help Center. Each example includes a sample website you can edit to try it out.