cancel
Showing results for 
Search instead for 
Did you mean: 

Login / Logout Functionality in Navigation

Login / Logout Functionality in Navigation

Is there a way to add a login / logout link based on if the user is logged in or out?

 

I have a theme installed on our Magento 2 storefront that has a megamenu. 

 

Here's how my dropdown is configured for "MY ACCOUNT"

<ul>
<li class="level1"><a href="{{config path="web/secure/base_url"}}customer/account/">Account Home</a></li>
<li class="level1"><a href="{{config path="web/secure/base_url"}}return-policy/">Orders &amp; Returns</a></li>
<li class="level1"><a href="{{config path="web/secure/base_url"}}shipping-time/">Shipping Time</a></li>
<li class="level1"><a href="{{config path="web/secure/base_url"}}contact/">Support</a></li>
</ul>

Would love to add an if statement to display the login or logout link in here.