XF 1.5 how to place log out button in navigation bar?

hi all,
recently login button add on navigation bar? and I can use the code is
<!--Login/Signup -->
<xen:if is="{$showHomeLink}">
<li class="navTab home PopupClosed"><a href="{xen:link login}" class="navLink">{xen:phrase log_in}</a></li>
</xen:if>
Screenshot (39).webp
when the use login the site again the navigation bar show the login button?
but how to change the code when the user login after it will placed only logout button in place of login button?
how to change the code?
Screenshot (40).webp
how to change when user login the login button is changes to logout button how to change the code?
 
<!--Login/Signup -->
<xen:if is="{$showHomeLink}">
<li class="navTab home PopupClosed"><a href="{xen:link login}" class="navLink">{xen:phrase log_in}</a></li>
<xen:else />

<li class="navTab home PopupClosed"><a href="{xen:link logout}" class="navLink">{xen:phrase log_out}</a></li>

</xen:if>

I can use the above code but it is not working?
 
Back
Top Bottom