In my Simplenews twig template how do I get the URL of the page I am emailing? When a single test newsletter is sent, Drupal provides me with the expected URL as follows:
{% set foo = url('&lt;current&gt;') %}
&lt;p class=&quot;link-to-page&quot;&gt;
&lt;a href=&quot;{{ foo|render|replace({'simplenews':  &quot;&quot;}) }}&quot;&gt;{{ 'You can view this news article in your web browser' }}&lt;/a&gt;
&lt;/p&gt;

Or by using the trim Twig  function
But when sending the actual newsletter issue to subscribers, the batch process causes the url(‘current’) to provide a batch url like https://my-site.uk/batch
How can I obtain the one I want (to direct newsletter recipients to the page). Will a preprocess theme function see the same url values as twig or can I reliably capture the node’s real URL there Somehow?
This is better!
&lt;p class=&quot;link-to-page&quot;&gt;
  &lt;a href=&quot; {{ url('entity.node.canonical', {'node': node.id}) }}&quot;&gt;
      You can view this news article in your web browser
  &lt;/a&gt;
&lt;/p&gt;