1

Okay. So I can be dense at times, but I just do not get it!

Background: On my previous template, I had a link to a search page with a GCSE query form and the results appearing below. A user would click the search link and it would go to a search page where the user can type the query and get the results all on one page. Not bad, but not perfect. But now I have updated the templates for my site to a mobile friendly template I created a long time ago but did not hammer out all the details and thought I would get a bit smarter with GCSE. And so I removed that click a search link mechanism mostly because the look and feel of the new template, though quite familiar, has changed enough to warrant updating. Otherwise, it would be horribly ugly! Like that was any different from the previous template. Ugly.

Today: I have been working on a GCSE Default form using CSS to customize the look and feel and am really really close to pretty dang good. However, when I tested it, it brought up a Google web page. Huh. I thought way back that there was a way to specify a target page which would be my search (results) page. Makes sense so far? Sound reasonable?

I selected the Two Page option under Look and Feel and Layout which I assumed that the GCSE form can be on one page and the results would appear on another page of my choice. Still, I get a Google page. I experimented around and poked around and cannot figure out how to make searching on one page and showing the results on another page happen.

Q: Is my understanding of the Two Page option correct? Is yes, then what am I missing?

Q: Is Results Only is a good option especially in light of already having a form original to the template? I would have to work on this too, but who cares about that? What I am still missing is how to get it to my search (results) page.

Perhaps this is one of those things that is right under my nose, but I just cannot seem to bull dog it. The GCSE help is rather poor and I would prefer an answer that walks through a solution, but not the GCSE help (yet again).

1 Answer 1

1

Belay my last!

I found it. Of course this is always the way...

On this page: https://developers.google.com/custom-search/docs/tutorial/implementingsearchbox

I found that instead of <gcse:searchbox-only></gcse:searchbox-only>, you would need to use and modify <gcse:searchbox-only resultsUrl="YOUR_RESULTS_PAGE_URL"></gcse:searchbox-only> changing YOUR_RESULTS_PAGE_URL to your URL/URI.

Works like a champ!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.