CodeIgniter Forums
how to use subcontroller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: how to use subcontroller (/thread-22084.html)



how to use subcontroller - El Forum - 08-29-2009

[eluser]ranjitbd[/eluser]
//we can create folder in views and accees them thorough

$this->load->view('tmbd/contact_us')

//like that

//following is a function call where losAngles is the controller hollywood is the method name


<a href="&lt;?=base_url()?&gt;losAngles/hollywood.html">travelmartbd.com</a>

//if i create a folder in controller name usa and losAngles is inside the usa folder then what will be the code

<a href="&lt;?=base_url()?&gt;usa/losAngles/hollywood.html">travelmartbd.com</a>// is it corret?


how to use subcontroller - El Forum - 08-31-2009

[eluser]ranjitbd[/eluser]
//following is a function call where losAngles is the controller hollywood is the method name

Code:
<a href="&lt;?=base_url()?&gt;losAngles/hollywood.html">travelmartbd.com</a>

//if i create a folder in controller name usa and losAngles.php is inside the usa folder and hollywood is the method name
//then what will be the code

<a href="&lt;?=base_url()?&gt;usa/losAngles/hollywood.html">travelmartbd.com</a>

// is it correct?


how to use subcontroller - El Forum - 08-31-2009

[eluser]Clooner[/eluser]
Try it out and you will know if it is correct.