Welcome Guest, Not a member yet? Register   Sign In
Accessing dynamic links in the format of domain.com/<dynamic_page_name>
#4

(This post was last modified: 10-12-2015, 02:19 AM by slax0r.)

Well, you could make routes for every page name as well.
PHP Code:
$route["page_name1"] = "controller/page_name1";
$route["page_name2"] = "controller/page_name2";
// and so on... 

But, then each time you add/delete/update a page controller or method, you will have to update the routes. But would still be a better solution than my previous suggestion. I was probably drunk then.

Edit: of course if you have a lot of those pages stored in the database, and you want to have it dynamic, you can easily extend the router and make dynamic routes for those pages this way.
Reply


Messages In This Thread
RE: Accessing dynamic links in the format of domain.com/<dynamic_page_name> - by slax0r - 10-12-2015, 02:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB