how to implement dynamic "routes"? |
[eluser]drewbee[/eluser]
Like we were suggesting earlier, do something like this: Create a form along with a search id (note: search_id should be within the valid CI allowed_characters). This form accepts the values of search_id, and the search query string. From the form, insert search_id, and search_query_string into the database. So now we have as an example in our table: Code: search_id (varchar) | search_query_string (text) So the user can go to http://www.example.com/controller/method...m_search_1 and with a simple database query pull in search_query_string belonging to 'custom_search_1' as passed to method of controller. No hooks, no hacks. I feel you are trying to make this more complex then what it needs to be. Each user can create there own mapping with this as well. This is how I would do it, plus you get to maintain CI's security of the character requirement in the URI. I apologize if I am not understanding your requirements better, or if I can better explain this let me know! |
Messages In This Thread |
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 05:42 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:11 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:53 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 08:09 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 05:32 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 12:24 PM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 04:17 PM
how to implement dynamic "routes"? - by El Forum - 09-12-2008, 07:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 07:19 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 10:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:23 PM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:25 PM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:06 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 05:55 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 06:41 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 07:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 11:54 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 01:44 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 07:56 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 09:21 AM
|