XF 1.4 How can I do that?

Dylan V

Well-known member
Hello,

I have a problem with the customization of my style. This is the problem, I have added an option to enable or not the button "Login in or Sign up" in the header, but I also have the search bar at this location:

Screenshot_1.webp

Currently, the search bar is above the button:

Screenshot_2.webp

If I disable the option:
Code:
<xen:if is="@headerLoginOrSignUpButton">

Screenshot_3.webp

All is well and the button goes in the sidebar:

Screenshot_4.webp

I would like to know how I can display the search bar only for the members and only if the option:
Code:
<xen:if is="@headerLoginOrSignUpButton">

is enabled?

Thanks.
 
Edit the xen:if and include a conditional statement to hide content for guests: Conditional Statements
I currently use:
Code:
<xen:if is="!{$visitor.user_id}">

#QuickSearch
{
    visibility: hidden;
}

</xen:if>

<xen:if is="{$visitor.user_id}">

<xen:if is="@headerLoginOrSignUpButton">

<xen:else />

#QuickSearch
{
    visibility: visible;
}

</xen:if>

</xen:if>

But the search bar does not appear when the member is connected.
 
Back
Top Bottom