Special Links

Special links are predefined links that make it easier for the end-user to pick and set commonly used links for their buttons or links.

These could also be dynamic links that your system generates at the time the message is sent, typically because they include the message ID, the recipient’s email, or some other variable. One of the most common one is the unsubscribe link.

327

Here's an example on how to define special links. It also allows nesting.

unlayer.init({
  specialLinks: [
    {
      name: 'Manage account',
      href: 'https://[my-account]/',
      target: '_self',
    },
    {
      name: 'Frequently used',
      specialLinks: [
        {
          name: 'Subscribe',
          href: '[subscribe]',
          target: '_blank',
        },
        {
          name: 'Unsubscribe',
          href: '[unsubscribe]',
          target: '_blank',
        }
      ]
    }
  ]
})

What’s Next