• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

#1
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).png
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).png
how to change when user login the login button is changes to logout button how to change the code?
 
#3
<!--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?