Welcome Guest, Not a member yet? Register   Sign In
first segment of url
#1

[eluser]inner[/eluser]
Hey all,

Im learning to code with CI and I faced with the first problem. The problem is that I want my personal web to be seperated in 3 or 4 menus. Just like the codeigniter.com. This site has a few menus:

codeigniter.com/downloads/
codeigniter.com/news/
ellislab.com/forums/
...

So what do i do if i want to have some menus like these:
site.com/forum
site.com/blog
site.com/contacts

For now i have created one controler and it's called 'blog'. It's the parent controller and has some other segments above (site.com/blog/abc/2), but what i want for now is the other controller 'forum' with it's own segments above for ex. 'site.com/forum/addtopic'. How to implement this? I can't find the exact information on the user's guide.
Thank you very much.
#2

[eluser]inner[/eluser]
Looks like this is implemented by creating a separate directories for 'blog', 'forum', and 'contacts' in the application folder. Or is there any other ways to do that?
#3

[eluser]Piter[/eluser]
HI!

Get involved with Uri routing
http://ellislab.com/codeigniter/user-gui...uting.html

For example:

$ Route ['contact'] = "blog / contact";
#4

[eluser]inner[/eluser]
Thank you that was really helpful.




Theme © iAndrew 2016 - Forum software by © MyBB