Welcome Guest, Not a member yet? Register   Sign In
Best way to check a URL and then load the right content? Example inside...
#1

[eluser]ChrisF79[/eluser]
New to Codeigniter and I'm trying to learn best practices here. Hopefully you guys can give some advice. For my real estate site, I have the URL format: mysite.com/site/property/923749283-123-main-street

What I want to do is check the URL and see if there is something behind the /property/ piece. I created the code to do this and it works well. Should I put that in my model?

Then, if there is something in the URL to indicate a house, I want to show the page that has the detail for my house. If it is blank, I want to show the standard property search page.

So, in my controller, do I run the function to pull the URL and then do an if/then statement to determine which view to load?


Messages In This Thread
Best way to check a URL and then load the right content? Example inside... - by El Forum - 06-04-2012, 11:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB