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.

How to: Create a search url

June 05, 2012 7:56am

Subscribe [4]
  • #1 / Jun 05, 2012 7:56am

    Hi All,

    I have a question. In order to get the max out of this add on:
    http://devot-ee.com/add-ons/am-impact-search-suggest

    With I think is really great i need to be able to create a link for the suggested words. Those words come out as a plain text, so no link or HTML.

    I work with the Default EE search module. Now i need to create a link for the suggested words. So if anyone clicks on a suggested word, they will search on that word.

    The default EE search module is encoded. So what i need is the encoded search url of a suggested word.

    I hope any one can help me with this, as the module owner doesn’t use the default search module.

  • #2 / Jun 05, 2012 8:05am

    Rob Allen

    3108 posts

  • #3 / Jun 05, 2012 8:08am

    As i wrote in the first post, i am using the default search module.

    We want to use the default module for this site. I am aware that it is possible with Low Search too, but i am looking for a solution for the default search module

  • #4 / Jun 05, 2012 8:26am

    Rob Allen

    3108 posts

    Rather than use the search module you could utilise URL segments then use the segment to return matching Channel entries…

    URL example, keyword in segment 3: /template_group/template/keyword

    Channel tag example:

    {exp:channel:entries channel="mychannel" search:custom_field1="{segment_3}" search:custom_field2="{segment_3}"}
    {title}
    {/exp:channel:entries}
  • #5 / Jun 05, 2012 8:35am

    The Add-on gives suggestions. This means somewhere, in my searchable fields, the suggested word exists.

    But it could exist in multiple entries, in multiple channels etc. So running a new search with the suggested word would be the best solution here.

  • #6 / Jun 05, 2012 9:37am

    Low

    407 posts

    The native Search module will always require a POST request to perform the search. Therefore, using a link (GET request) to search results that haven’t been generated yet is simply not possible with the native Search module.

    Bluedreamer’s suggestion of passing the word through a URI segment is risky, as the word may contain diacritics or other non-url-safe characters.

    Also, as I can read from the add-on description, it uses an internal dictionary rather than entry contents to come up with the suggestions. That means a suggested word doesn’t necessarily have to exist in your entries.

    The only solution I can come up with with the native module, is to create a search form with a hidden keywords input field, then use JavaScript to make each suggestion clickable, and upon click, set the value of the hidden keywords field to that suggestion and submit the form.

  • #7 / Jun 06, 2012 11:14am

    Shane Eckert

    7174 posts

    Hey Bubblefish Interactive,

    Looks like you have some great feedback here.

    You might be better off going with an Add-On, at least that’s how it would seem.

    Is there anything else we can help you with?

    Cheers,

  • #8 / Jun 06, 2012 11:18am

    The native Search module will always require a POST request to perform the search. Therefore, using a link (GET request) to search results that haven’t been generated yet is simply not possible with the native Search module.

    Bluedreamer’s suggestion of passing the word through a URI segment is risky, as the word may contain diacritics or other non-url-safe characters.

    Also, as I can read from the add-on description, it uses an internal dictionary rather than entry contents to come up with the suggestions. That means a suggested word doesn’t necessarily have to exist in your entries.

    The only solution I can come up with with the native module, is to create a search form with a hidden keywords input field, then use JavaScript to make each suggestion clickable, and upon click, set the value of the hidden keywords field to that suggestion and submit the form.

    Hi Lodewijk,

    You are correct, but multiple forms aren’t a great solution.. Also a Jquery solution isn’t the best way to do it.

    The part about the dictionary i don’t agree with you. I use solution 1 of the add on not solution 2.

    Maybe we do need a alternative search module, but thats the last resort option..

    Thanks all!

     

  • #9 / Jun 07, 2012 3:29pm

    Shane Eckert

    7174 posts

    Hey Bubblefish Interactive,

    Is there anything else I can help you with?

    Cheers,

  • #10 / Jun 08, 2012 2:58am

    Hi Shane,

    This was it 😊

    Thanks

  • #11 / Jun 12, 2012 10:29am

    Shane Eckert

    7174 posts

    Hey Bubblefish Interactive,

    Awesome!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases