Forum Discussion

tagged-leo's avatar
14 years ago

Do not show the "Search Granularity" dropdown in the search form widget?

Hi, I've added a custom component to be used only on the community page.  The custom component include the common search widget:

 

<div id="ask_a_question_form"><@component id="common.widget.search-form" /></div>

 

I'd like to disable the search granuliarity for this.  Is there an additional element I can put in to achieve this such as showSearchGranularity="false" />?

  • Got it to hide using CSS:

     

    .CommunityPage .search-granularity {    display: none;}

8 Replies

  • BrianO's avatar
    BrianO
    Lithium Alumni (Retired)
    14 years ago

    As far as I know, it is not currently possible to remove the dropdown without custom development. Since you are the second person to ask this week, it seems like this idea is gaining some traction.

     

    I would suggest opening a case to see if the team here has any ideas of ways to accomplish this and/or add it as an enhancement request in our Ideas area.

  • Thanks Brian.  I'll go ahead and request it in the ideas section. 

     

    Perhaps there's a way to just hide this element using CSS.  

     

    If I wanted to hide something specific to the "CommunityPage" how would I do this?  Can you direct me to the right place?

  • tagged-leo's avatar
    tagged-leo
    Ace
    14 years ago

    Got it to hide using CSS:

     

    .CommunityPage .search-granularity {    display: none;}

  • BrianO's avatar
    BrianO
    Lithium Alumni (Retired)
    14 years ago

    Nice! I had just pinged one of our designers to see if they had any ideas.

     

    Feel free to mark your own post as an Accepted Solution so that others searching for this fix can find it more easily. :)

  • tagged-leo's avatar
    tagged-leo
    Ace
    14 years ago

    Better way - specify the element within the body of the community page: 

     

    #lia-body.CommunityPage .search-granularity {   display: none;}

  • RobbL's avatar
    RobbL
    Lithium Alumni (Retired)
    14 years ago

    Now that we know the "how," I would be interested in the why. In particular, removing the user search means that people have to click the search button with no entry, or an irrelevant entry to get to a page where they can specify that they want a user search. That is confusing and many won't figure out that process. Additionally, if you add our Tribal Knowledge Base feature at some time, you can also focus your search there.

  • The answer is related more towards the feature of this search functionality. We are using this component on our landing page and customizing the design to fit our style. What we wanted was the initial search box with type ahead functionality and have the user execute a general search.  We found that it wasn't necessary to have the users selected a category from the dropdown, so we wanted to remove only from the home page (which is why you see the CSS element to hide it only on that page). 

     

    To add to my previous request, I would add that you should not only be able to remove the search granularity but also specify which filters to apply (i.e. search in Ideas or Blogs).  

  • DocuMarc's avatar
    DocuMarc
    Expert
    10 years ago
    <component id="common.widget.search-form" hideGranularity="true"/>

    works as well