Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to exclude the Searchbox from certain pages?

gohuntergohunter
edited April 2014 in Vanilla 2.0 - 2.8

Hello!

My question I would like to not show the search box in Sign-Up page as it is not necessary to show there.
The thing is my search box is located right in the body not in the header, it is showing on every page on the forum.

My html file looks like this:

{searchbox}
{asset name="Content"}


Thanks

Version 2.1rc1

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    remember how you used display:none to hide the other one?

    Use the same method. Find the name of the body for example

    body.Vanilla.Discussions.index .SiteSearch{
    display:none;
    }
    

    Look at the source with a web inspector and get the name of the body you want to use to hide it in that specific page.

  • peregrineperegrine MVP
    edited April 2014

    @gohunter said
    My question I would like to not show the search box in Sign-Up page

    or maybe you want this

    #dashboard_entry_signin .SiteSearch {
        display: none;
    }
    

    find the body id of sign in page and combine with Search box element and display none.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Then this would be better so it also works in register page

    body.Dashboard.Entry .SiteSearch{
    display:none;
    }
    
  • peregrineperegrine MVP
    edited April 2014

    could be but he didn't say register page - I give them what they ask for (signIn). questions need precision and thought before being posted.:).

    V, I imagine your second mind read is probably accurate though.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I learned this from Kasper so it must be right !!! :D

  • peregrineperegrine MVP
    edited April 2014

    I learned this from Kasper so it must be right !!!

    You mean Mr. Theme.

    edited, to save the innocent.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    No, @Kasper is from Denmark if memory serves me right.....although there is a similarity based on that painting and his avatar...

    coward p .... tisk tisk, I guess you also saw the similarities ;)

  • I thought he was German.

    grep is your friend.

  • peregrineperegrine MVP
    edited April 2014

    @x00 said:
    I thought he was German.

    Nein.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited April 2014

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Are you sure he is not Greek, via Norway, via Denmark, via Germany, and in the house of House of Schleswig-Holstein-Sonderburg-Glücksburg?

    grep is your friend.

  • LincLinc Detroit Admin

    Pinging @Kasper to please reign in his groupies... ;)

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Hahaha, thanks for the interest ya'll! I am indeed a Dane—den bedste af slagsen ;)

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    @gohunter‌ Seeing how you're using 2.1, you can also make use of the InSection function:

    {if !InSection("Entry")}
      {searchbox}
    {/if}
    

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Hey thank you so much for all your suggestions. I'm going to work on it right now... excited.

    Thanks for chit chatting in my post :)

Sign In or Register to comment.