Welcome Guest, Not a member yet? Register   Sign In
[2 Q's] Calling multiple Conroller & including extern files
#1

[eluser]snaKeSz[/eluser]
Hi, i am new on Code Igniter and i could need some Help.

My Basepage is layout.php and i want to use this controller to get a "Include Template" running.

Means, that i want to get a Website calling multiple controllers like logIn or Latest News on the layout/template page.

Is there a good solution for this problem?
Or what is the best war doing this?

Second Question sounds stupid.. but i got problems with this.
Where is the right place for the css file? In the Application Folder?
And how do i call it when i put it there?

This is my url:
http://127.0.0.1/codeigniter/

Can someone help me? Wink

Best regrades, Nico
#2

[eluser]n0xie[/eluser]
Answer to your first question: this is probably not what you want. You don't want to call several controllers for 1 request. In the MVC pattern, 1 request equals 1 controller. Obviously since this is PHP, you can break the rules rather easily. You can crossload controllers using HMVC.

Answer to your second question: wherever you like. Obviously it has to be somewhere in your webserver folder. Most people use an 'assets' folder. Personally I use a 'public' folder. It's mostly what you feel is right.
#3

[eluser]snaKeSz[/eluser]
Okay i will check out your link.

But you say that is the wrong way.

Is there any tutorial or maybe documentation for a template system for codeigniter?

On a normal website i want to have some features like content, login, latest news, random gallery pictures and such things on just one page.

I think its not a good solution to code them into an extra function in the layout.php controller, and i am searching for a good solution.

Regrades, Nico
#4

[eluser]snaKeSz[/eluser]
Sorry for doubleposting, but i think, that i found a solution here:
http://ellislab.com/forums/viewthread/49910/

and/or here:
http://ellislab.com/forums/viewthread/62366/

I will check this out this evening. Smile




Theme © iAndrew 2016 - Forum software by © MyBB