Dynamic Blitz Template not loading currentUser I have a Dynamic Blitz template with a currentUser if statement within it. For some reason, it's not working and I can't figure out why.
It gets loaded in as follows:
{{ craft.blitz.getTemplate('brands/_followButton', { elementId: entry.id }) }}

The code on the page running it:
 {% if currentUser %}
  {% if craft.follow.check({ elementId: entry.id }) %}
    &lt;a class=&quot;btn btn-sm btn-light py-2 px-3 mr-2&quot; rel=&quot;nofollow&quot; href=&quot;{{ craft.follow.unfollowUrl(entry.id) }}&quot;&gt;&lt;span class=&quot;material-icons mr-2 md-18&quot;&gt;favorite&lt;/span&gt;Unfollow&lt;/a&gt;
  {% else %}
    &lt;a class=&quot;btn btn-sm btn-light py-2 px-3 mr-2&quot; rel=&quot;nofollow&quot; href=&quot;{{ craft.follow.followUrl(entry.id) }}&quot;&gt;&lt;span class=&quot;material-icons mr-2 md-18&quot;&gt;favorite_border&lt;/span&gt;Follow&lt;/a&gt;
  {% endif %}

  {% else %}
    &lt;a class=&quot;btn btn-sm btn-light py-2 px-3 mr-2&quot; rel=&quot;nofollow&quot; href=&quot;/register&quot;&gt;&lt;span class=&quot;material-icons mr-2 md-18&quot;&gt;favorite_border&lt;/span&gt;Follow&lt;/a&gt;
{% endif %}
Your code looks correct. Test with the following code in brands/_followButton.
{{ currentUser ? 'Logged in' : 'Logged out' }}


For some reason, it's not working and I can't figure out why.

Can you explain what specifically is not working? And provide the version of Blitz that you're using?