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 }) %}
<a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.unfollowUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite</span>Unfollow</a>
{% else %}
<a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.followUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite_border</span>Follow</a>
{% endif %}
{% else %}
<a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="/register"><span class="material-icons mr-2 md-18">favorite_border</span>Follow</a>
{% endif %}
_followButton
template template directly does it show correctly?