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.

Customizing the Search Results

August 30, 2007 3:30pm

Subscribe [1]
  • #1 / Aug 30, 2007 3:30pm

    seth.aldridge

    68 posts

    Hi/Lisa, 😉

    I am working on getting the search results how I want them and I’ve run into a shag which I’m not sure if there is a work around for.

    I have a few weblog entries that I want to show in the search results but I want the corresponding links to point to a different page.  I’ve tried manually changing the URL in the post by adding a # in front of the URL so it would, when clicked, take you to the section of the entry that matches…I’ve also tried just deleting the URL all together so it would simply go where I defined it in the Preferences, but the URL always comes back as it was before?

    Is there a way to do this?  I assume not, but I wanted to ask to appease my O.C.D.

    Thanks,
    Seth

  • #2 / Aug 30, 2007 3:38pm

    Lisa Wess

    20502 posts

    I didn’t follow this at all, everyone/Seth. ;p

    Ok, you have some entries that you want to go to a different location than others.  What separates these entries?  What is *different* about them?  category? status? weblog?

  • #3 / Aug 30, 2007 5:04pm

    seth.aldridge

    68 posts

    Here is an example.

    If you search for About Us then it would return “About Us” and “Contact Us” which is fine, but if you search for “Biometric Scanners” then it would try to pull up the page for Biometric Scanners which does not exist, because Biometric Scanners is used as a Reverse Related Entry and would display on the “system/features” page.

    So “about us” would be http://www.myurl.com/about_us but “Biometric Scanners” would be “http://www.myurl.com/system/features/”.

    Currently it is trying to do “http://www.myurl.com/system/features/biometric_scanners”

    I guess what I would like to know is can you redirect a result based on the result itself?

  • #4 / Aug 30, 2007 5:25pm

    Lisa Wess

    20502 posts

    These reverse related entries are in a different weblog, yes? If so, you can use weblog conditionals to show the correct link…

  • #5 / Aug 30, 2007 5:40pm

    seth.aldridge

    68 posts

    They are in separate weblogs but I’m not sure I follow you on which conditionals to use?  I will play around with the code at home and I might have another solution as well.

  • #6 / Aug 31, 2007 2:22pm

    seth.aldridge

    68 posts

    I have found a weird problem that I’m not sure how to fix and I don’t know if I’ve set something up wrong.

    I have the word Xalted in the About Us “Body” field which is set to “Searchable” in the Custom Field Settings, but when I search for the word it says it “Your search did not return any results.”?

    I can clearly see that the word is there and that the field should be searchable, which is why I think I’ve set something up wrong.

    Here is my Search box code:

    <div id="search">
    
        {exp:search:simple_form weblog="static|news|features_list" no_result_page="search/noresults" result_page="search/results" results="10" where="any"}
    
        <label for="keywords">Search:</label>
        <input type="text" name="keywords" id="keywords" value="" class="search" />
    
        <input type="submit" value="Search" />
    
        {/exp:search:simple_form}
    
    </div>

    And it works if I search for titles of pages, but not specific keywords that are clearly in the body of the text.

    [edit]

    I added:

    search_in="everywhere"

    as a parameter and it works fine now.

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

ExpressionEngine News!

#eecms, #events, #releases