11 Replies Latest reply on Mar 10, 2016 11:36 AM by Scott A Johnson

    Customize Search Dialog

    pgupta2

      Hi,

       

      Can you please help me over the following requirement -

      We have a request to customize search. To the right of Bookmarks we want to add 'NEW TAG'' that returns the results of a search of the some other application. We would fetch search result through web service (REST or SOAP) in the application.

      Untitled (1).png

      Please share your thoughts.

       

       

      Regards,

      Pooja

        • Re: Customize Search Dialog
          Scott A Johnson

          Hi Pooja,

           

          Looks like your image is missing. Can you attach a new screenshot of what you're trying to accomplish?

           

          Thanks,

          Scott

              • Re: Customize Search Dialog
                Scott A Johnson

                Thanks Pooja, what version of Jive are you working on?

                 

                The soy template that renders the tabs is visor.soy.

                 

                The visor template includes a "nav" element with class j-visor-tabs. You should be able to add an additional tab link there.

                 

                The multiple views (Suggestions, History, Bookmarks) are found in the directory soy/spotlight/views/. Each view has its own soy file. You would probably need to add a new template file for your custom tab view.

                 

                The javascript that adds and manipulates these views is in ui-modules/spotlight/scripts/visor/ui.js. Looks like there's a number of changes that need to be made to this script to include the additional view, but at least there are samples for each of the existing views to help understand what is needed.

                 

                Hope this helps,

                Scott

                1 person found this helpful
                  • Re: Customize Search Dialog
                    pgupta2

                    Hi Scott,

                     

                    Thank you so much for your answer.

                    We are working on 8.0.2 version (Hosted).I found the soy files in theme files but I was unable to get that javascript files you mentioned

                    (ui-modules/spotlight/scripts/visor/ui.js).Can you please tell me where can I find javascript files?I could find only soy and ftl files in themes.

                     

                    Regards,

                    Pooja

                      • Re: Customize Search Dialog
                        Scott A Johnson

                        The js file is in the WAR, not theme. Modifying this script will probably require deploying a custom WAR file.

                          • Re: Customize Search Dialog
                            pgupta2

                            Hi Scott,

                             

                            Thank you for your reply.I do have one more question-

                            Does jive hosted instance have access to this js file you are referring to?If yes then will it be a lot of work to build and maintain Custom wars across upgrades?

                             

                            Regards,

                            Pooja

                              • Re: Customize Search Dialog
                                Scott A Johnson

                                Yes, in a hosted environment you can deploy a custom war file through the Cloud Admin site.

                                 

                                Whether it's difficult to maintain across upgrades depends on what type and how many customizations you make to the war file. It is definitely a consideration when deciding to how to customize your site.

                                1 person found this helpful
                                  • Re: Customize Search Dialog
                                    pgupta2

                                    Hi Scott A ,

                                     

                                    I understand we can deploy custom war through jive cloud admin.How do I access those js files in hosted version and create custom war?

                                    Also we are able to show new tab in jive search using soy files.We need to find the way to show data from another internal application in search.

                                    Can you help me in this?

                                     

                                    Regards,

                                    Pooja

                                      • Re: Customize Search Dialog
                                        Scott A Johnson

                                        Hi Pooja,

                                         

                                        To learn how to create a custom WAR, you can start here How To: Create a Custom Jive Project

                                         

                                        This will help you get your development environment setup and you'll be able to build a WAR file using maven from there.

                                         

                                        We need a bit more info about how you'd retrieve the data you want to display in search. Does this only need to be displayed in a custom spotlight search tab? or does it need to be displayed in the search results page? Matt's answer to your other question (Show data from another internal application in search. ) is a good approach to including external (OpenSearch) search engine results within Jive's search results.

                                         

                                        Thanks,

                                        Scott

                                          • Re: Customize Search Dialog
                                            pgupta2

                                            Hi Scott,

                                             

                                            Right now we need to display data in custom spotlight search tab.Also we do not want deep customizations . Is there a way we could avoid creating and deploying custom wars and still somehow show data from internal application in search.Perhaps creating our own JS and add JQuery AJAX calls that send a search request to a web service of that application and provide the results?Please let me know if it is feasible or not.

                                             

                                            Regards,

                                            Pooja

                                              • Re: Customize Search Dialog
                                                Scott A Johnson

                                                Hi Pooja,

                                                 

                                                I believe the easiest approach would be to use a custom WAR, customizing the javascript files that already exist. As with many things in Jive, working with the existing approaches tends to be the simplest, most maintainable way.

                                                 

                                                That being said, almost anything is possible using enough code. Since it sounds like you've already got a custom search tab created, but not populated, I imagine you would be able to include some jquery ajax calls within that custom soy you included to populate that tab.

                                                 

                                                I'm still not totally clear on what you're looking to achieve so it's difficult to give you a answer on what is and is not possible.

                                                 

                                                Scott