Reputation: 69
In a twig
template with Drupal 8
, I have a view.
I want this view to be displayed only if it has a result and if the current user is logged in.
I tested the code below but it doesn't work :
{% if logged_in and if view > 0 %}
Upvotes: 1
Views: 54
Reputation: 66
Try this:
{% if logged_in and view > 0 %}
You don't have to put it in parentheses.
Upvotes: 3