- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 06:53 AM
Hello,
I have a contextual search, when a user searches it gives a list of "record producers". The user wants to simple click on the link and it should take him to the required 'record producer'.
So I want to get rid of this button "Take Me To Form" [which does the right job, but want the url link before it to do the job]
I have searched everywhere in the contextual search and record producers, but cannot locate this "Take Me To Form" button.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2016 04:58 AM
Hi Andy.
You can get rid of the button with a catalog client script. Please be aware though, when you upgrade, there may be changes to Contextual Search could break your script. You'll be able to see if we've changed anything in contextual search in the release notes though.
This is the script:
function onLoad() {
document.observe("cxs:target_update", function() {
$$("#cxs_results_container button.request_catalog_button_with_icon").each(function(elem, index) {
elem.hide();
});
});
}
The event cxs:target_update is fired each time a search is completed.
This is what my catalog client script looks like:
This will only work on your record producer. If you wanted to do hide the Order button when displaying contextual search results on a form you would need to create an onLoad client script there too. The however should be the same.
Let me know if this works for you.
Thanks,
Cameron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 08:16 AM
Hi Andy,
Contextual Search doesn't ship with a "Take Me To Form" button.
This looks like a record producer you're on. Can you check and make sure you have a variable in the Record Producer called "Contextual Search Results"?
Secondly, can you check if you have any Catalog Client Scripts that could be changing the button's name through the DOM?
Thanks,
Cameron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 09:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 09:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 09:40 AM
If you can't find the variable then I don't think you're using Contextual Search. That variable is what we use to render all the search results that contextual search returns. If it isn't there then you probably aren't using it on that record producer.