Gravatar for chris.ruderschmidt@americaneagle.com

Question by Chris Ruderschmidt, Aug 5, 2015 11:40 AM

How can I add a tab section to Sitecore mobile search?

We are trying to add a similar tab control to our mobile version of a search as our desktop version. Is there currently a way to implement this?

Here is a sample code snippet from the desktop version.

            <div class="coveo-tab-section">
              <a class="CoveoTab" data-expression='`<%= ToCoveoFieldName("templatename", true) %>==("Product Series")' data-id="SeriesTab" data-caption='Series'`></a>
              <a class="CoveoTab" data-expression='<%= ToCoveoFieldName("templatename", true) %>==("Product Part")' data-id="PartsTab" data-caption='Parts'></a>
              <a class="CoveoTab" data-expression='<%= ToCoveoFieldName("LFPageType", true) %>==("Technical Resource")' data-id="TechTab" data-caption='Technical Resources'></a>
                <a class="CoveoTab" data-expression='<%= ToCoveoFieldName("ShowInAdditionalResults", true) %>==("yes")' data-id="AdditionalTab" data-caption='Additional Results'></a>
            </div>

Thanks!

1 Reply
Gravatar for sbelzile@coveo.com

Answer by Sébastien Belzile, Aug 5, 2015 1:03 PM

Hi,

If you download directly the JS Search framework (https://developers.coveo.com/display/public/JsSearch/Downloading), you will notice example pages included in the package. Look for the page MobileAll.html, it has an example that does what you want. Just copy it to a copy of CoveoSearchMobile.ascx.

Since you are working with Sitecore, take the same precautions as for a normal page: https://developers.coveo.com/display/public/SC201507/Adding+Coveo+Tab+Components+in+a+Coveo+Search+Page

Gravatar for chris.ruderschmidt@americaneagle.com

Comment by Chris Ruderschmidt, Aug 5, 2015 4:29 PM

Thanks! Upon inspecting the element, I think my issue may be in how it is styled. It is there, just behind the search bar.

Ask a question