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.

setting up search results - simple

February 10, 2011 4:56pm

Subscribe [7]
  • #16 / Feb 16, 2011 8:30pm

    mz91184

    100 posts

    I am not sure why that would post title information into the excerpt column.

    The if statement should check for the channel and then route to different urls based on the short channel name.  It is how I route search results in my EE sites.  I haven’t had any issues yet.

    Can you post a excerpt from the output source code?  Mainly just one or two rows of results.

  • #17 / Feb 16, 2011 8:38pm

    grounded

    138 posts

    Pretty sure this is where you set the search except -  Admin -> Channel Administration -> Channels -> Edit Preferences -> Administrative Preferences

    This only takes me to my main Channel admin area, do not see a location to select ‘edit-preferences’.. hhhmm

  • #18 / Feb 16, 2011 8:41pm

    grounded

    138 posts

    Pretty sure this is where you set the search except -  Admin -> Channel Administration -> Channels -> Edit Preferences -> Administrative Preferences

    This only takes me to my main Channel admin area, do not see a location to select ‘edit-preferences’.. hhhmm


    SORRY, nevermind, i see you meant each channel preferences, I see it.. disregard last post

  • #19 / Feb 16, 2011 8:49pm

    grounded

    138 posts

    OK, so i’m not sure why, but at least half of my channel admin setting give me no option to select a field for excerpt. Any reason why that would be?

  • #20 / Feb 16, 2011 8:58pm

    mz91184

    100 posts

    I don’t know the answer to that one.  Maybe someone else does?

  • #21 / Feb 17, 2011 10:02am

    Sue Crocker

    26054 posts

    OK, so i’m not sure why, but at least half of my channel admin setting give me no option to select a field for excerpt. Any reason why that would be?

    Hi, Grounded. Have you assigned custom field groups for those channels? What kinds of fields are you using?

    mz91184 Thanks for the assist!

  • #22 / Feb 17, 2011 1:50pm

    grounded

    138 posts

    Hi Sue,

    Yes, all channels have a custom field group assigned to them. They fields I am needing/trying to search through are mainly ‘textareas’.
    Not sure why this is, but the channels that are displaying an option in the admin-preferences to select a field for excerpt, are the channels I have setup as
    ‘listings’ in the structure module. The other channels I have setup (with custom field groups assigned) show no option to select a field for excerpt in the admin-pref area of the channel

    It would appear that my searches are finding matches in the content of those channels, and only finding matches for the entry titles/page titles in the other channels, (so not the content body in those other channels, only the entry/page title…

  • #23 / Feb 18, 2011 2:56am

    John Henry Donovan

    12339 posts

    grounded,

    It would appear that my searches are finding matches in the content of those channels, and only finding matches for the entry titles/page titles in the other channels, (so not the content body in those other channels, only the entry/page title…

    You need to go and edit those custom fields and make sure search is enabled for them. It is off by default for each new field you make. If you haven’t done this then the dropdown menu for the Search excerpt in your channel preferences will be empty

    Does that help?

  • #24 / Feb 18, 2011 9:14pm

    grounded

    138 posts

    Ok, was able to make the fields searchable and then I was able to choose the ‘excerpt’ field thanks. A remaining issue though, is the links. mz91184 made a suggestion to fix the links using a ‘if/then’ type code…. would this have to be set for EACH of the channels I am searching then? (I have about 6-7 channels that needs to be searchable..)

    Thanks,

  • #25 / Feb 20, 2011 3:22pm

    Greg Salt

    3988 posts

    Hi grounded,

    If you use that method then yes, you would need to add a conditional for each channel. However, you can set default search paths for each channel in its preferences.

    Cheers

    Greg

  • #26 / Feb 25, 2011 4:17am

    grounded

    138 posts

    Mr. Salt, I see where i can set the default search paths for each channel, but once I update it, there seems to be no change to the links for that channel in the search results. (That sure would be an easy fix if that did work, much better than writing statements for each channel..)

  • #27 / Feb 25, 2011 4:44am

    grounded

    138 posts

    OK, so i tried the code:

    {if channel_short_name == 'research'}
                <a href="http://{title_permalink=research}">{title}</a>
            {if:elseif channel_short_name == 'other-channel'}
                <a href="http://{title_permalink=other-channel}">{title}</a>
            {if:else}
                <a href="http://{title_permalink}">{title}</a>
            {/if}

    with no luck again, anyone have some more direction to help me out on this?  I guess i am still unsure what goes in the ‘short name’ nad ‘other-channel’ locations from the above syntax.

    What is essentially happening is that pages that are children of other pages, do not have the parent directory in the search URL:

    Search URL link renders:
    http://www.onami.us/index.php/snni


    But should be rendering:

    http://www.onami.us/index.php/research/snni

    Pages that do not have parent pages link just fine….

    Thanks for the help, sorry, i’m def a noob 😊

  • #28 / Feb 25, 2011 2:30pm

    Sue Crocker

    26054 posts

    Hi, Grounded.

    Let’s have you double check the paths for each of your channels.

    Are they all set?

  • #29 / Feb 28, 2011 9:31pm

    grounded

    138 posts

    Thanks Sue,

    Here are my channel path settings. As you can see, I have entered the search result settings path, but i believe all else is a default setting.
    http://grounded4life2.dyndns.tv/onami/pics/channelPaths.png

    For the above example, one of the search results URL in that channel, is:

    http://www.onami.us/index.php/partner_institutions

    When the actual page URL is :

    http://www.onami.us/index.php/About/partner-institutions

  • #30 / Feb 28, 2011 9:46pm

    grounded

    138 posts

    We’re close to finishing this site and am hesitant to make changes that could have a negative impact on the site, so i’ll wait to hear back before making any changes to the path settings.. 😊

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

ExpressionEngine News!

#eecms, #events, #releases