Is there a way to define a custom template for the “no results” view of the Magento search?
The thing is that I want to use a 1 col layout if there’s no result in a search, and 2 col if there is a match.
Cheers!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i had the same issue: I hated that it was not easy to customise ’empty’ pages i.e. empty search results, category pages and basket page. So I made an extension a while back for this: https://github.com/drewhunter/EmptyHandles . Essentially, it gives you 3 extra layout handles:
So in your specific case, you would use the following xml to change the template on an empty search results page after installing the module: