Skip to main content

Portal customization

  • December 13, 2019
  • 1 reply
  • 121 views

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... :) 

Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

  • Top Contributor
  • 40 replies
  • December 17, 2019

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!