Welcome Guest, Not a member yet? Register   Sign In
Dynamic routes
#1

[eluser]Unknown[/eluser]
Maybe someone has ideas and can help, how to set up dynamic routes and modules.

I'd like to create routes and modules are taken from the database and the page links would look as follows:
http://example.com/about/ and http://example.com/contacts/ => This use text module and text function
http://example.com/news/ and http://example.com/articles/ => This use news module and all-news function
http://example.com/news/id/article-title/ => use news module and get-new function

Maybe something that already exists or who would be the easiest option to create it?
#2

[eluser]Mareshal[/eluser]
What is your experience with CI? How long have you been coding using CI?

Answer these questions before I might give you an answer
#3

[eluser]Unknown[/eluser]
A couple of days.

I read routing user guide, but did not understand how to create this.
#4

[eluser]Mareshal[/eluser]
[quote author="Valters" date="1273674652"]A couple of days.

I read routing user guide, but did not understand how to create this.[/quote]

OK...now I understand.

1. Don't use modules from start. It'll be harder to understand MVC. When you know it better, then move to HMVC or create your own structure

2. When you create a route, you create a path to a controller and it may use any model/library inside

3. $route['about'] = "controllerName"; or $route['about'] = "controllerName/MethodName";

Is very easy what you are trying to achieve, but start with the beginning, not the mid-end.




Theme © iAndrew 2016 - Forum software by © MyBB