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.

Need help with EE-Search

April 24, 2012 4:42pm

Subscribe [2]
  • #1 / Apr 24, 2012 4:42pm

    iPixel

    64 posts

    So i have a section “ask_me” and it uses a custom section field group “ask_fg”.

    Inside that field group i have 3 fields.

    1- category
    2- ask_body
    3- featured_item

    How can I use the {exp:search:advanced_form_search} ee syntax in order to search only entries within the ask_me section, but take into consideration the category field.

    For example, I’d like to search a term “How can I” withing only the CARS category, so dont bother showing me any results that may have BIKES, BOATS, etc…

    Is this possible?

  • #2 / Apr 25, 2012 1:39pm

    Shane Eckert

    7174 posts

    Hello iPixel,

    Thank you for posting your question here on the ExpressionEngine forums.

    For reference:

    category_id
    CARS = 7
    BOATS = 3
    BIKES = 5

    You can limit the search to a category. So say you only want to show results in the CARS category and the CARS category has the id of 7, you would use category=“7”.

    Or you can go the other route and say category=“not 3|5”.

    I hope this helps. I can go further with example if needed.

    Cheers!

     

  • #3 / Apr 25, 2012 2:13pm

    iPixel

    64 posts

    That’s just it, the category you are referring to is applied to sections. My category is applied via custom section field to a specific entry. I figured me calling the custom field “category” would confuse. But using category=”” will not look in the right field_id_## for the actual category I created and applied to an entry.

  • #4 / Apr 26, 2012 3:22pm

    Shane Eckert

    7174 posts

    Hello iPixel,

    That’s a good question then. Category is a custom field, not sure how to make this work.

    I can move this to the Community Help Forum if you would like.

    Cheers,

  • #5 / Apr 26, 2012 3:36pm

    iPixel

    64 posts

    Please do. Hopefully there’s a solution.

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

ExpressionEngine News!

#eecms, #events, #releases