I create a simple home page making at first the controller that point to it.Now inside the home page I have some links that point to another page.since I’m a newbie I’ asking to what those link have to point?maybe to others controllers that points to another pages? If so, which could be the best way to implement those controller in the index page?
Share
Don’t understand well your question, but links to other pages are controllers/methods that build those pages.
You can also use the built-in methods to build a correct url for CI. Load the
URL helper(autoload it or use$this->load->helper('url');) and you can use:That (the
site_url()function) would build a correct (for CodeIgniter) link towww.yoursite.com/index.php/controller/method.In your controller then you’ll need to create the function (method) you asked for, and load the appropriate views.
Ex:
<a href="<?php echo site_url('blog/write');?>">Write an entry</a>will map to
controllers/blog.php:But CI’s possibily the best documented framework out there, so refer to the manual and this will be soon very clear.