Forum Discussion

tealiumjustin's avatar
7 years ago

Customize search granularity options

Does anyone have experience creating an @override component for the standard search? I need to customize the search granularity drop-down and it appears that the only way to do is to create a custom component. I've tried various JavaScript approaches that manipulate the granularity <select> menu directly, but there is more to it than that. For example, the LITHIUM.SearchForm() function is initialized with an object called nodesModel that contains the valid/expected granularity options, so when I tried to change the DOM with a custom option, the onchange handler code wouldn't recognize it as a valid option.


If only I could copy the core search component, then customize it as an @override, but that's not an option. Is there a DIY solution here or is Lithium Professional Services my only option?

  • Hi Justin,

    The only option you have here is to actually create a fully custom search, that being said, either Lithium PS can do it or your develoment team or dev partners can. You can check the community for netapp, also on lithium, they have a custom search which we implemented.

    Overidding wouldn’t work.

    I hope this helps.
  • tealiumjustin - Could you please share what exactly you want to change inside the granilarity drop-down? 

    The thing I want to mention, example if you want to add more option there, you might able to add using jQuery etc, howevee, it will not work as it only can search by provided options. 

     

    Also the @overide menthod can add anything above or below the component but can not update the existing component. 

     

     

     

  • Hi Justin,

    The only option you have here is to actually create a fully custom search, that being said, either Lithium PS can do it or your develoment team or dev partners can. You can check the community for netapp, also on lithium, they have a custom search which we implemented.

    Overidding wouldn’t work.

    I hope this helps.