ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple search not working

October 13, 2012 2:29pm

Subscribe [1]
  • #1 / Oct 13, 2012 2:29pm

    kspencer

    4 posts

    I’m hitting a brick wall.

    I’ve been through the documentation and the forums. I’ve made some headway but still can’t get everything to work.

    My form code:

    {exp:search:simple_form channel="blog"}
    <fieldset class="search">
      <input type="text" name="keywords" id="keywords" value="" size="18" maxlength="100" result_page="blog/search-results" results="20" show_future_entries="yes" search_in="everywhere" status="open" no_result_page="blog/search-noresults">
      <input type="image" src="{site_url}/assets/images/btn-search.png" value="Submit" class="btn">
    </fieldset>
    {/exp:search:simple_form}

    I’ve gone into the template preferences and added in the url for the search page. I can go directly to the noresults page but now if I try and go directly to the results I receive the generic: Search Results: Your search did not return any results. Return to Previous Page

    If I attempt to search, I’m taken to a general secondary template that is filled with all of my content using that template. The address for this page is at search/results.

    What now?

    THANK YOU!

     

  • #2 / Oct 15, 2012 3:24pm

    Kevin Smith

    4784 posts

    Hi kspencer,

    Could you please try adding the no_results_page and results_page parameters to the tag, referencing the templates you set up for those two results pages? If that doesn’t work, let me know what happens instead.

  • #3 / Oct 15, 2012 5:56pm

    kspencer

    4 posts

    you guys rock. Work perfectly. THANK YOU!!!!

  • #4 / Oct 16, 2012 1:59pm

    Robin Sowell

    13255 posts

    😉  Glad Kevin got you squared away!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases