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

XF 1.4 How can I do that?

Dylan V

Well-known member
#1
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.png

Currently, the search bar is above the button:

Screenshot_2.png

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

All is well and the button goes in the sidebar:

Screenshot_4.png

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.
 

Brogan

XenForo moderator
Staff member
#2
Those options appear to be from a custom style, so you will need to seek support in the style thread.
 

Dylan V

Well-known member
#3
Those options appear to be from a custom style, so you will need to seek support in the style thread.
I am the creator of this option and it is unique.

I want just that the search bar is not displayed for the visitors if this option is enabled.
 

Dylan V

Well-known member
#5
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.