Is there a way I can direct users to the sign in page when searching the help center instead of showing "no results"?


3 Comentários

  • Samantha Chavez

    This is not a redirect, but it was intended to be a quick solution to a common customer complaint from my customers. They wanted a prompt when not logged in vs a generic "no results" when looking for articles.  I did a very cheeky attempt without putting a whole lot of brain power into it. I am putting it here for you Matthew Rawls in case it sparks a path or a better idea fo your use. I have sure there is better ways of doing this, but I did not want to waste to much time on it. (Not a pro, I poke and poke until I get what I need when it is not built in to the theme.) I hope this at least helps a little. 

    I basically added an {{#isnt signed_in}} statement to my search_results.hbs right before the final {{else}}. 

    {{#isnt signed_in}}
    <p class="text-gray-600">You are not logged in to the help center. Please log in to view the search
    <a href=""> Log in</a>
    <p class="text-gray-600">
    {{t 'no_results_unified'}}
    {{#link 'help_center'}}
    {{t 'browse_help_center'}}
  • Matthew Rawls

    Samantha Chavez Thanks for this! I created something really similar to this as a workaround. But any one looking for a similar answer, this will work great.

  • Lindsey

    Would a work around like this be possible for one article that is behind sign-in? 


Por favor, entrar para comentar.

Powered by Zendesk