Does the Google Custom Search Engine work with Silverstripe?

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

I can’t get any search functions in silverstripe to work and I’m resorting to my last resort: google custom search. Yet, if I try to set up a search engine for my site, it doesn’t work. Currently, the site is in a subdirectory and I don’t think google custom search works with subdirectories. But even if I set it up from the root of the web server, it won’t find any results in the silverstripe subdirectory. Plus, I’ve tried setting the silverstripe page as a subdomain but it won’t work that way either. My question is, will silverstripe work with google custom search engine if the silverstripe site is as the root of my web server?

Yes it should work fine. I have used GCS on a SilverStripe site in the past although admittedly a few years back.

I don’t see why GCS should care whether SS is under a sub directory or not because GCS doesn’t have any knowledge about your website infrastructure, it just operates on Google’s index. If your website is live and it’s pages are indexed by Google then CSE should work okay. When you set up a CSE at https://cse.google.com/ you should be able to access a search form to test with - does that work? If not, you probably need to fix the issue with Google rather than SilverStripe by ensuring all of your pages are discoverable by Google and/or checking your CSE configuration.

You could use: GitHub - sunnysideup/silverstripe-search_simple_smart: A search engine for Silverstripe sites that makes it possible to implement complex searches in a simple way..

I am very happy to help you get started.