Show CTAs on daily emails

This commit is contained in:
Oliver Davies 2024-02-18 20:19:58 +00:00
parent aab8c9f75d
commit e962e89ffb
2 changed files with 10 additions and 14 deletions

View file

@ -6,6 +6,15 @@
{{ parent() }}
<p>- Oliver</p>
{% block cta %}
{% set ctas = [
'Are you still using Drupal 7 and dont know whats involved to upgrade to Drupal 10? <a href="https://www.oliverdavies.uk/call">Book a Drupal 7 upgrade consultation call</a> or <a href="https://www.oliverdavies.uk/drupal-upgrade">an upgrade roadmap</a>.',
'Need help or want another pair of eyes on your code? Book a <a href="https://www.oliverdavies.uk/call">1-on-1 consulting call</a> or an <a href="https://www.oliverdavies.uk/pair">online pair programming session</a> with a 100% money-back guarantee.',
'If you\'re creating a new Drupal module, try my <a href="https://github.com/opdavies/drupal-module-template">free Drupal module template</a>.',
] %}
<p>P.S. {{ random(ctas)|raw }}</p>
{% endblock %}
{% endblock %}
{% block content_bottom %}

View file

@ -32,20 +32,7 @@ use:
<div style="max-width: 550px;">
{{- email.blocks.content -}}
<br />
<hr />
{%- if email.blocks.cta %}
{{ email.blocks.cta }}
{% else -%}
{% set ctas = [
'Are you still using Drupal 7 and dont know whats involved to upgrade to Drupal 10? <a href="https://www.oliverdavies.uk/call">Book a Drupal 7 upgrade consultation call</a> or <a href="https://www.oliverdavies.uk/drupal-upgrade">an upgrade roadmap</a>.',
'Need help or want another pair of eyes on your code? Book a <a href="https://www.oliverdavies.uk/call">1-on-1 consulting call</a> or an <a href="https://www.oliverdavies.uk/pair">online pair programming session</a> with a 100% money-back guarantee.',
'If you\'re creating a new Drupal module, try my <a href="https://github.com/opdavies/drupal-module-template">free Drupal module template</a>.',
] %}
<p>P.S. {{ random(ctas) }}</p>
{% endif %}
{{ email.blocks.cta }}
</div>
</description>
<pubDate>{{ email.date|date('D, d M Y H:i:s') }} GMT</pubDate>