4 Replies Latest reply on May 14, 2014 4:38 PM by nyanamadala

    Hide Facets on Search

    nyanamadala

      I am trying to Hide Messages in my search Facet. What would be the best approach? Any ideas?

      t.png

        • Re: Hide Facets on Search
          DominicG

          You could do it with some css

          li.j-facet[data-value="dm"] {

          display: none;

          }

          • Re: Hide Facets on Search
            nyanamadala

            Hi Dominic,

             

            Thank you for your response. I am trying to find the data from where these facets are being populated.

            This data is coming from SearchFacets.soy when we are searching. I am wondering about the content in show facet - contentFacets.

            {template .contentFacets}

            <div class="j-box j-sub-facets j-content">

                <h4 id="search-facets-show-content-desc">

                    <label>{i18nText('search.facets.show')}</label>

                </h4>

                <nav>

            <ul data-facet="content" data-param="type" role="listbox" aria-labelledby="search-facets-show-content-desc">

                        {foreach $contentFacet in $contentFacets}

                            {call .facet}

                                {param type : $contentFacet /}

                                {param active : $selectedContentFacet==$contentFacet /}

                                {param searchType : 'content' /}

                            {/call}

                        {/foreach}

                    </ul>

                </nav>

            </div>

            {/template}

            This content might be coming from one of the templates. Do you have any idea from where this data is being populated?

            tt.JPG

            Thank you.

             

            Naveen Yanamadala.

              • Re: Hide Facets on Search
                DominicG

                Hi Naveen,

                 

                I don't think you can manage those individual list items just from the soy template. I only say that because I've tried and haven't been able to. Someone with more expertise can correct me if I'm wrong.

                 

                The way we've always hidden those is with css. You can drop this into your custom-css.soy or custom-css.ftl to hide messages from the list

                li.j-facet[data-value="dm"] {

                display: none;

                }

                -Dominic

                  • Re: Hide Facets on Search
                    nyanamadala

                    Hi Dominic,

                     

                    I think we can manage individual list items by finding the soy template

                    In my case:

                    - It is SearchFacets.soy

                    //Hiding People and Places from the Left search Facet

                    // ****************************************************  

                          //   <li data-value="people" class="j-bucket" role="listitem" aria-labelledby="search_for-title-group-desc">

                                   // <a href="#" title="{i18nText('search.search_for.title')} {i18nText('search.search_for.people')}">

                                      // <span class="j-status"></span>

                                     //  <span class="j-508-label">{i18nText('search.search_for.title')}</span>

                                     //   {i18nText('search.search_for.people')}

                                    </a>

                                </li>

                               // <li data-value="places" class="j-bucket" role="listitem" aria-labelledby="search_for-title-group-desc">

                                   // <a href="#" title="{i18nText('search.search_for.title')} {i18nText('search.search_for.places')}">

                                       // <span class="j-status"></span>

                                      //  <span class="j-508-label">{i18nText('search.search_for.title')}</span>

                                       // {i18nText('search.search_for.places')}

                                    </a>

                                </li>

                    // ****************************************************  

                    This worked for 'Search for':

                    ttt.JPG

                    Original:

                    taa.JPG

                    I am trying to do the same for 'Show' rather than modifying custom-css.ftl file. In case of 'Show':

                    <ul data-facet="content" data-param="type" role="listbox" aria-labelledby="search-facets-show-content-desc">

                                {foreach $contentFacet in $contentFacets}

                                    {call .facet}

                                        {param type : $contentFacet /}

                                        {param active : $selectedContentFacet==$contentFacet /}

                                        {param searchType : 'content' /}

                                    {/call}

                                {/foreach}

                            </ul>

                    and this is where i am lost in finding the file

                     

                    Anyways your solution will also work. Thanks a lot for your time

                     

                    - Naveen Yanamadala.