Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi i made a custom page to display search results on my website, but having a trouble when the search query is not found, all that is displayed is a blank page. Is there a way to place a conditional that displays a message when the word is not found but displays the results if its found?
We can use cms:no_results tag for such condition.
Making the following changes to your existing <cms:search>...</cms:search> block should handle the problem
Code: Select all
<cms:search ..
   ..
   ..
   <cms:no_results>
      <h3>No pages found for <cms:show k_search_query /></h3>
   </cms:no_results>
</cms:search>

Hope this helps.
Thanks KK that actually works
3 posts Page 1 of 1
cron