Page 1 of 1

feeding a topic to a search box via link or similar

Posted: Fri Nov 10, 2023 5:57 pm
by Jose Barzuna
Hello,
I wanted to put a #tag in a page that when clicked would feed the word to the searchsite object, for example, if I want to find all instances of the word Blue I would put a #blue with some kind of link that would then feed that term (#blue) to the sitesearch box and execute sending the results to the searchsite results page, can this be done in any way?
Regards,
Jose

Re: feeding a topic to a search box via link or similar

Posted: Fri Nov 10, 2023 6:07 pm
by Pablo
How did you setup your site search?
Do you have a link?

Re: feeding a topic to a search box via link or similar

Posted: Sat Nov 11, 2023 5:35 am
by Jose Barzuna
At this time the search is just a site search object that searches across the whole site (over 100 pages) for the search term you enter in the search box but you have to type or copy/paste the search term into the dialog box and press the search button, what I want to do is to have a search term that looks like a link (underlined and blue) that upon clicking it triggers the search for that term and displays it in the search result page, but I have not found a way to do this, I would thing that this is done using an onclick event that transfers the hyperlink text to the search box and triggers the search but have been unable to configure it

So far what I have tried is:
1-Select the text of the link say I want to look for the term #Confianza so I select the term
2-create a link, on the dialog
a-I do not enter anything on the ¨link tab¨, however, in the url apears the word #Confianza
b-On the events:
add an onclick event
Action ¨set value¨
Target ¨Sitesearch1¨
Value ¨#Confianza¨
Posting the page the word #Confianza is entered into the Search dialog but I can not trigger the search, what am I missing to make it run the search?

Further, the onclick event will allow me to post the value to the sitesearch in the same page, can you make it post the value to a sitesearch object in a master page so that I do not have to create a sitesearch object in 100+ pages?

Regards, Jose

Re: feeding a topic to a search box via link or similar

Posted: Sat Nov 11, 2023 7:01 am
by Pablo
In the help is explained how to show the results in another page.
Did you try this?

Re: feeding a topic to a search box via link or similar

Posted: Sat Nov 11, 2023 12:58 pm
by Jose Barzuna
Hello, Got it running, I was missing the event to trigger search (javascript / page search)
Can this be run from a master page?
Can the search box be turned into a dropdown list?

Re: feeding a topic to a search box via link or similar

Posted: Sat Nov 11, 2023 1:02 pm
by Pablo
No, I do no think this will work on a master page.

The search box support 'auto complete' mode.