Emails and Links Liquid Examples

by David Goldfarb Updated May 28, 2020

Emails and Links

Approval Button: {{ 'Approve' | button_link : approve_url }}

Reject Button: {{ 'Reject' | button_link : reject_url }}

View Request Button: {{ 'View Request' | button_link : view_request_url }}

Add Buttons to Emails

{{ 'Onit' | button_link : '' }}

Wizard / Widget link filters (Second Mover Form)

In emails You can also embed {{ 'button text' | wizard_link : atom }} in a notification, which will create an anchor link that will take the user directly to the launch form in edit mode without rendering the atom view. See also edit_form, which can be appended to the end of an atom URL and will render the atom in launch form view.

in addition to wizard_link there is wizard_url, e.g., {{ atom | wizard_url }} which will generate a URL instead of a link. The URL can then be used with button_link, e.g., 

{% assign my_url = atom | wizard_url %}{{ 'Press Me' | button_link : my_url }}

From a Suite. Use “widget_atom_link” (to render second mover) form or widget_atom_link_popup(render full atom view in popup form.) E.g., 

{{ 'Edit' | widget_atom_link: atom}}

 {{ | widget_atom_link: task }}

Get Email Attachment IDs

This Liquid will get the attachment IDs of documents sent to a Record via email.

{% assign mail_id = %}
{% for doc in documents %}
{% if doc.attachment_owner_id == mail_id %}
{{ }}
{% endif %}
{% endfor }

Project Emails

Approve email: {{email_address.account}}.approve@{{email_address.subdomain}}

Reject email: {{email_address.account}}.reject@{{email_address.subdomain}}

Non-Anonymous attachment download URL

The user must be logged into Onit to use this link, it is not anonymous. 

{% attachment_link generated_document %}

Generate Anonymous Attachment Download URL

This Liquid will generate an anonymous URL that will let anyone download the contents of an attachment Field. Parameters: the field name, the expiration period. The expiration period is expressed in days. The default is 45 days. The parameter accepts a decimal: .5 for 12 hours, .001 for 86 seconds, etc. You can also say "never".

{% capture url %}
{% anonymous_attachment_url atom, attachment_field_name, 30 %}
{% endcapture %}
<a href="{{url}}" download>Anonymous Download Link</a>

Launch App Form from Suite Widget

This Liquid creates a clickable link that will launch an App without navigating the user away from their dashboard. This only works in the context of a suite portal widget, not an atom portal widget.

{{ "click here" | widget_atom_launch: "App Name" }}

Parametrized Links (Anonymous Launch Page)

To create anonymous launch with included parameters, use the {% create_launch_url %} tag, along with subtags {% app %} and {% param %}. An example:

{% create_launch_url my_link %}
    {% app 'My App' %}
    {% param name = 'Test Atom' %}
    {% param requester_name = 'Alice' %}
    {% param checkbox = true %}
{% endcreate_launch_url %}

This example constructs a link which is stored in my_link. You can then use my_link in a hyperlink:

<a href = "{{my_link}}">Click Here</a>

Or a button link, as shown just above:

{{ 'Click Here' | button_link: my_link }}
Previous Article Working with Fields Liquid Examples
Next Article Miscellaneous Liquid Examples

© 2020 Onit, Inc. contains proprietary and confidential information owned by Onit, Inc. that is subject to copyright. Onit presents it exclusively to you for your sole use in conjunction with using Onit products. No portion of the materials contained herein may be used for any other purpose. No portion of the materials contained herein may be shared with third parties or reproduced in any form.