I need to add a condition to hide elements from the Portal Home Page when users are not logged in. This code doesn't work for me: {% if portal.is_not_login_page %} so I need smth to say when users are not logged in. Anyone has any ideas? Please help... :)
Page 1 / 1
Hi Victoria,
We're using this liquid here to determine if customers are logged in or not to show/hide the edit profile/logout buttons on our header.
{% if portal.has_user_signed_in == true %}
<a href="{{ portal.profile_url }}">Edit Profile</a>
<a href="{{ portal.logout_url }}">Log Out</a>
{% else %}
<p> Whatever else you want to show when there is a logged in user</p>
{% endif %}
Good luck!
Join the Community
Already have an account? Login.
Sign in to the Community
No account yet? Create an account.
Social Login
Login for Freshworks Employees Login with LinkedInor sign up below
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.