Welcome Guest, Not a member yet? Register   Sign In
Whi CI doesn't have Layouts implemented?
#1

[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?
#2

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

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

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

[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.
#6

[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.
#7

[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.
#8

[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
#9

[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.)
#10

[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?




Theme © iAndrew 2016 - Forum software by © MyBB