Common widget User slide out menu in wrapper?
Hi all
Hoping somebody can help me. I'm wanting to use an if else conditional in the outer wrapper (in top nav bar) so that if a user isn't logged in they will see the 'register / login' button, and if they are logged in they will see their avatar and username where the 'register / login' button would have been. The issue is when I use <@component id="common.widget.slide-out-menu"/> in the wrapper (header) all pages throw up a crazy error and won't render. Effectively what I'm trying to achieve is this:
<#if user.anonymous == true>
<a href="#" >
<span> Register / Login</span>
</a>
<#else>
<@component id="common.widget.slide-out-user-menu"/>
</#if>
It's worth noting that using the @component id above works fine when in a component just not in the wrapper. And when clicked it bring the user menu slide out drawer.
Thanks in advance