Implementing a search results sidebar filter like Zendesk's
Posted Nov 24, 2016
I was wondering if you can provide some direction/customize-able code to be able to implement a left hand search result filter like the on you utilize here in the Zendesk Help Center. It would be nice to provide our users with the ability to search within specific topics whether in the Community or Knowledge Base, as you do.
Currently we only have the split in results between Community or Knowledge base, but no way to filter by topic or section.
I would love to set up our search result page, just like yours
7
18
18 comments
Natalia Moraes
0
Natalia Moraes
Preciso de um filtro no meu resultado que considere apenas os Artigos, não quero que apareça como resultado a Comunidade. Alguém pode me ajudar?
<section id="main-content" class="search-results-column">
<!--h1 mostra a frase com a quantidade de resultados -->
<h1 class="search-results-subheading">
{{#is current_filter.identifier 'unified'}}
{{t 'results' query=query count=results_count}}
{{else}}
{{#unless current_subfilter.identifier}}
{{t 'results' query=query count=results_count}}
{{else}}
{{t 'results_with_scope' query=query count=results_count scope_name=current_subfilter.name}}
{{/unless}}
{{/is}}
</h1>
{{#if results}}
<ul class="search-results-list">
{{#each results}}
<li class="search-result-list-item result-{{type}}">
<h2 class="search-result-title">
<a href="{{url}}" class="results-list-item-link">{{title}}</a>
</h2>
<div class="search-result-icons">
{{#if vote_sum}}
<span class="search-result-votes">
<span class="visibility-hidden">
{{t 'votes_sum' count=vote_sum}}
</span>
<span aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-result-votes-icon">
<g fill="none" stroke="currentColor">
<path stroke-linejoin="round" d="M10.77 4.5a.73.73 0 01.73.73C11.43 7 11.21 11.5 10 11.5H5a.5.5 0 01-.5-.5V4.5s1-.5 1-3a1 1 0 012 0v3z"/>
<rect width="2" height="7" x=".5" y="4.5" rx=".5" ry=".5"/>
</g>
</svg>
{{vote_sum}}
</span>
</span>
{{/if}}
{{#if comment_count}}
<span class="search-result-meta-count">
<span class="visibility-hidden">
{{t 'comments_count' count=comment_count}}
</span>
<span aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-result-meta-count-icon">
<path fill="none" stroke="currentColor" d="M1 .5h10c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H6l-2.6 2.6c-.3.3-.9.1-.9-.4V8.5H1C.7 8.5.5 8.3.5 8V1C.5.7.7.5 1 .5z"/>
</svg>
{{comment_count}}
</span>
</span>
{{/if}}
</div>
<article>
<ul class="meta-group">
<li>
<ol class="breadcrumbs search-result-breadcrumbs">
{{#each path_steps}}
<li title="{{name}}"><a href="{{url}}">{{name}}</a></li>
{{/each}}
</ol>
</li>
<li class="meta-data">{{author.name}}</li>
<li class="meta-data">{{date created_at}}</li>
</ul>
<div class="search-results-description">{{text}}</div>
</article>
</li>
{{/each}}
</ul>
{{else}}
<p>
{{t 'no_results_unified'}}
{{#link 'help_center'}}
{{t 'browse_help_center'}}
{{/link}}
</p>
{{/if}}
</section>
0
Ryan McGrew
Hi 414991880293,
The Unified Search interface will allow your users to filter search results by category. This will require some updates to the HTML and CSS of your theme. The page I linked to above has some information on how your theme might need to be updated to include those filters and use Unified Search. Let me know if that makes sense.
Thanks!
0
Natasha Callender
Hi Ryan,
Thanks for getting back to me. What I'm looking for is the ability to filter results by section & category in the sidebar. We arrange our articles by product line (sections) within a few major categories.
If an end user uses the global search from the help center landing page, I'd like them to be able to filter the search results by product (sections).
Can you help?
Thanks
1
Ryan McGrew
Hey All,
We released this feature last year and is now the default experience in the Copenhagen theme. Here is some info on implementing it in your theme
Thanks!
0
Natasha Callender
Hi Brett,
Any update on the status of this feature? I am in a similar position as the others in the thread.
Thanks
0
Brett Bowser
Thanks for sharing your interest in this feature Manuel :)
The beta is still on-hold currently but is being reviewed internally by our Product Managers. Feel free to subscribe to our Announcement topic as any updates will be posted there.
Cheers!
0
Manuel Zimmermann
Yes!! I'm very much interested in this feature.
0
Vlad
Status?
1
Vlad
I'm also interested in this feature. Making it available for everyone will be just perfect!
1
Sign in to leave a comment.