CMS Development

dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Hubl code for site search

resolver

Hey all, 

Looking to employ the new-ish site search capabilities of hubspot rather than the google search.  Was trying to find the hubl code for it, but cannot seem to find it.  does anyone know what it is or if it exists?

 

maybe it is super simple and is {% site_search %}

 

If anyone could point me in the right direction, i would be much obliged!  

 

d

0 Avaliação positiva
2 Solução aceitas
tjoyce
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Hubl code for site search

resolver

@dennisedson

Go through this walkthrough to setup your search results page.

Then add this form to your coded file. There isn't a HUBL tag but this html/HUBL should work

      <form action="/{{ site_settings.content_search_results_page_path }}">
        <input type="search" class="hs-search-field__input" name="term" autocomplete="off" placeholder="{{ module.placeholder }}">
        {# 
        You can set additional search parameters by adding hidden inputs 
        like the example below. Both the typeahead and search results 
        modules will accept these, except 'limit' which only works for results.
        
       	<input type="hidden" name="limit" value="5">
        #}
      </form>

 


tim@belch.io

Exibir solução no post original

0 Avaliação positiva
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Hubl code for site search

resolver

@Hubmate,

If you right click on the search module you should see an option to edit.  You will be led to a new tab and be told that you cannot edit this module, but can clone it.  Clone and play 🙂

Exibir solução no post original

7 Respostas 7
tjoyce
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Hubl code for site search

resolver

@dennisedson

Go through this walkthrough to setup your search results page.

Then add this form to your coded file. There isn't a HUBL tag but this html/HUBL should work

      <form action="/{{ site_settings.content_search_results_page_path }}">
        <input type="search" class="hs-search-field__input" name="term" autocomplete="off" placeholder="{{ module.placeholder }}">
        {# 
        You can set additional search parameters by adding hidden inputs 
        like the example below. Both the typeahead and search results 
        modules will accept these, except 'limit' which only works for results.
        
       	<input type="hidden" name="limit" value="5">
        #}
      </form>

 


tim@belch.io

0 Avaliação positiva
Hubmate
Colaborador(a)

Hubl code for site search

resolver

Thanks for your contributions to the community site, Tim. Just wondering if you know the HubL tag and parameters used for the site search results? I wanted to customise search results but the standard drag'n'drop module doesn't provide any options.

 

Thanks,

Steve

dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Hubl code for site search

resolver

@Hubmate,

If you right click on the search module you should see an option to edit.  You will be led to a new tab and be told that you cannot edit this module, but can clone it.  Clone and play 🙂

Hubmate
Colaborador(a)

Hubl code for site search

resolver

Thanks Dennis, perfect. For some reason I can't select your answer as the solution.

dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Hubl code for site search

resolver

My answer is too good for that solution button. Hubspot knows it will make other people jealous

Hubmate
Colaborador(a)

Hubl code for site search

resolver

You are, indeed, the man. A legend.

 

Incidentally, have you had much luck configuring the search results? I'm trying to display the URL of each result but it is displaying like this: http://hubmate-co-3.hs-sites.com/hs-search-results?term=Advisors I'm also wondering how to display more text in the results snippet, I believe it has to do with this '&length=' parameter, not sure how to apply it :S

 

Any input much appreciated 🙂

0 Avaliação positiva
cph_design
Colaborador(a)

Hubl code for site search

resolver

@Hubmate did you ever get an answer on how to display the URL for the results?

0 Avaliação positiva