Dinamic page |
[eluser]stalwart[/eluser]
Hi all. I am new in framework and i want to ask how can i maka a dinamic page. my idea is to have a information that can be seen in all sub pages without declareing it in all sub pages. this is my code Code: class Base extends Controller {
[eluser]TheFuzzy0ne[/eluser]
You can probably create a private function (prefixed with an underscore) in your class, which will be called upon, and that can setup your variables for you. Code: private function _getVars() Hope this helps.
[eluser]Tom Glover[/eluser]
DB calls should be in a model, if you are sticking with MVC principle and have you called the the database class. Models: http://ellislab.com/codeigniter/user-gui...odels.html Database: http://ellislab.com/codeigniter/user-gui...index.html MVC: http://ellislab.com/codeigniter/user-gui...w/mvc.html Hope this helps you.
|
Welcome Guest, Not a member yet? Register Sign In |