CodeIgniter Forums
Whi CI doesn't have Layouts implemented? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Whi CI doesn't have Layouts implemented? (/showthread.php?tid=16646)

Pages: 1 2 3 4


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]chinathong[/eluser]
... well, please don't point me to sample urls since I saw how to implement a layout
i'm just asking what's wrong with CI team to not implement it?

will it make CI slower? will it bloat CI's code?


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]drewbee[/eluser]
I can haz cheeseburger?


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]Nick Husher[/eluser]
CodeIgniter focuses on back-end structure and development. Layout is a strictly front-end task, best handled by CSS.


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]chinathong[/eluser]
I'm not talking about the 'layout' handled by CSS


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]jedd[/eluser]
Quote:I'm not talking about the 'layout' handled by CSS

Perhaps you could describe what functionality you're talking about, 'cos my curiosity is piqued now.


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]jacobc[/eluser]
I'm quite sure he's talking about layout in terms of...

In an action if I say to load the addEditUser view... then why is there not an implementation built in to CI that would put that into a template (header, menu, footer)...

Is that right? I tend to agree, it is something that pretty much every application should/will have.


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]Jay Logan[/eluser]
I think maybe he means something like the Layout library where one can insert something like $this->layout->view('home') in a controller and have the home.php page content wrapped around a template. Similar to what some people do with including a header.php and footer.php file but I always found the 1 layout file cleaner and easier to manage.

I use the Layout library a lot. I pretty much re-packaged my clean CI install to include the Layout library. So now, I have a layouts folder in my views folder. Then I can make a default.php layout and an admin.php layout. The default.php layout loads automatically and when I want to use admin.php, I put $this->layout->set_layout('admin') in the controller.

It works good for certain layouts that require TinyMCE too.


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]chinathong[/eluser]
Similar to the Rails layout, aka: content_for_layout or yield

As far as I know, CI is using include files instead


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]Colin Williams[/eluser]
Maybe CI just assumes you're smart enough to implement it in your own way? I don't know; it's never terribly bothered me. Let's not forget that there is a big release on the way, so griping about what CI has and has not might be premature at this point. (Although, griping at any point is a shallow means of communication.)


Whi CI doesn't have Layouts implemented? - El Forum - 03-12-2009

[eluser]jacobc[/eluser]
[quote author="Colin Williams" date="1236930367"]Maybe CI just assumes you're smart enough to implement it in your own way? I don't know; it's never terribly bothered me. Let's not forget that there is a big release on the way, so griping about what CI has and has not might be premature at this point. (Although, griping at any point is a shallow means of communication.)[/quote]

But CI doesn't think we're smart enough to implement any of the other things they include?

And isn't it discussion about things like this that helps create ideas for subsequent releases?