Forum Discussion

cike's avatar
cike
Champion
11 years ago

Change selected value for search form granularity dropdown list

Hey,

 

is it possible to change selected search granularity value for the Search Form Widget (common.widget.search-form) via the parameters for the component?

 

Per default the value "category" is selected, but I would like to set "Knowledge Base" as the default selection.

 

Thanks for your help. :smileyhappy:

 

Best regards

Christian

2 Replies

  • Hi cike 

     

    Search V 1.0 settings are configured in Community Admin > System > Search> Search 1.0. Be sure that Search 2.0 is disabled in the Search 2.0 tab, if visible.

    In the XML tab you can configure the component to hide the drop down list that enables uses to choose the scope of their search, to display an Advanced Search link that takes the user to the Search Page that includes filtering options, to use a slim or wide display model, and to default the scoping options to a Community-level scope.

    Search V1 supports the parameters: showAdvancedSearchLink, hideGranularity, and defaultToCommunity. Search V2 supports the parameters: mode, hideGranularity, defaultToCommunity

    • To hide the drop down list to scope the search add: hideGranularity="true"
    • To show the Advanced Seach link add: showAdvancedSearchLink="true"
    • To default the scope of the search to be community-wide add: defaultToCommunity="true"
    • To change the component width, add: mode="slim" or mode="wide"

     

     

  • cike's avatar
    cike
    Champion
    11 years ago

    Hi VarunGrazitti ,

     

    thanks for your reply.

     

    But in my case I won't hide the search granularity dropdown, I only want to change the granularity value, which is selected by default.

    I thought/hoped this can be done by setting the "searchType" parameter in the XML tab.

     

    Unfortunately, setting the "searchType" parameter has no effect to the UI elements. Maybe I can use some JavaScript to achieve my goals, but that's not my favourite solution. :smileyindifferent:

     

    Best regards,

    Christian