0

I'm new to drupal. And I have a project that has a search block on the home page that redirects the user to a page based on the user search terms. Everything works fine but I have a FAQ page that includes all Questions and a search block and tags https://example.com/faq?keys=drupal&tags=All. The issue is when users search for terms on the home page, it redirects the user to the question node https://example.com/faq/53335 not the FAQ page and show the user question.

How can I fix that, should I create an alter function to check if it's FAQ page so redirect the user to that page and show him the asked question?

Update: the scenario is when user search for a term on the home page, the user will be redirected to another page that shows all search results as a list. some of the results belong to the faq page while others not. when the user clicks on the question, it'll redirect to the question node https://example.com/faq/53335, not the faq page https://example.com/faq?keys=drupal&tags=All

Is the faq page configured to redirect the user to the answer when there is only one answer? No, even if there is only one answer, the user will redirect to the page that shows all result. and from this page, he can click on the question.

5
  • Can you please explain the scenario a bit more? Does the search block on the home page submit to the faq page? Is the faq page configured to redirect the user to the answer when there is only one answer?
    – anoopjohn
    Nov 9, 2019 at 23:14
  • @anoopjohn Please check my updated question.
    – IDI
    Nov 10, 2019 at 5:58
  • Add a filter for FAQ titles as exposed form to your FAQ view.
    – leymannx
    Nov 10, 2019 at 7:51
  • Looks like leymannx understood your question. I am still unable to understand what your issue is.
    – anoopjohn
    Nov 11, 2019 at 0:36
  • Did you fix the problem? @IDI
    – anoopjohn
    Nov 12, 2019 at 2:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.