Customize search portal

Hi - We’d like to add some search best practices in or under the search bar. I’ve been trying to do that via portal customization without any luck. Is there any code you can recommend? We’d like to either modify the “Enter your search term here…” or add tips under the search bar itself.

Hey @tmw

There is this liquid element “search_element” in portal home (at least in ours).

So if you place your tips directly below, they should show up:
image

Here’s the code:

    <section class="container-fluid px-0 fw-helpcenter mb-md-n64">
      <div class="container">
        <div class="row">
          <div class="col-md-9 col-lg-6 mx-auto">
            {% assign search_text = 'portal_translations.banner.search_text' | t %}
            {{ portal | search_element: search_text }}
          </div>
          <div> Here's best practice </div>
        </div>
      </div>
    </section>

Thank you! Our search isn’t appearing as search_element, but this was just enough to help me change the way I was looking for it in the portal. All set now; thanks again.

1 Like