Welcome Guest, Not a member yet? Register   Sign In
Pass ID, display title in URL
#4

[eluser]smilie[/eluser]
Kamy, so what you are looking for is to see title in the URL, but to search based on the ID.
I do not think this will be easy.

CI considers everything behind controller name to be variable to be used in the controller.
Only thing that comes to my mind is following:

When calling controller, always to use forms. Meaning:
Page A -> index page (for example).
From there user clicks on a link which takes him to:
http://www.mysite.com/article/article-title
'Underwater' link is part of a form, with hidden article ID field.

In the controller, you simply 'ignore' article title variable and work with $this->input->post('articleid').

This way, user will see article title in URL, but all code will be done through article ID.

Maybe there are other ways, but I do not know them.

Hope this helps.

Regards,
Smilie


Messages In This Thread
Pass ID, display title in URL - by El Forum - 09-08-2010, 07:28 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 09:18 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 09:20 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 09:26 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 10:13 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 10:16 AM
Pass ID, display title in URL - by El Forum - 09-08-2010, 12:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB