Skip to content

Instantly share code, notes, and snippets.

@slavafomin
Created October 2, 2016 04:31
Show Gist options
  • Select an option

  • Save slavafomin/a178e99db7e8fa9a8bde4f3e23b81ae8 to your computer and use it in GitHub Desktop.

Select an option

Save slavafomin/a178e99db7e8fa9a8bde4f3e23b81ae8 to your computer and use it in GitHub Desktop.
This partial in Twig defines "Confirm" one-click action for E-Mail messages.
{#
Defined "Confirm" one-click action.
@param {string} title
@param {string} url
@param {string} [description]
#}
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ConfirmAction">
<meta itemprop="name" content="{{ title }}"/>
<div itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
<link itemprop="url" href="{{ url }}"/>
</div>
</div>
{% if description %}
<meta itemprop="description" content="{{ description }}"/>
{% endif %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment