late to the party here...these are quite good, thanks for the vids. I assume that layouts can include view cells (e.g. referencing discrete header, footer files!)
Hey Alex, What's the real benefit of using layouts over just views? Because for the benefit you mentioned, I could just create a render method in the BaseController, and could take care of the 3 echos in that method, which is actually superior, because then I can also do additional data passing or whatever at that level.
Very nice and useful ! What if we have queries from database in the footer ? how should be code this ? (eg: a widget in the footer that list the blog categories) Thank you Alex
Dear Alex, thank you for educating about layout. i have two questions, 1) you showed load one page using layout with 'content' tag, so each page 'content' tag to use to load layout? 2) for navigation how to load layout and content page?
Hi, I get this error Use of $this in global code might be unatendedPHP(PHP0437). It appears if I use the extend and render method. Can you tell me what cause this error and how to fix this?
Hey! Buddy Take the idea from my answer that I wrote to Mussiddiq Rahman. I meant you have to create a render section for every dinamics parte in your Layouts.
Hi Alex, thank you explaining in such detail. I've one question, how we change title of main layout page. So that every page should have separate title.
Hey! Buddy I do it in this way: 1.- I create a render section called 'metaPageTitle' for example: | My Blog 2.- To show a different title on your pages write: Your title I hope this can help you.
I really thank you for these videos, they are so helpful.
late to the party here...these are quite good, thanks for the vids. I assume that layouts can include view cells (e.g. referencing discrete header, footer files!)
l would like to appreciate for the great videos, thank you!
Awesome... Very helpful...
Hi Alex, your tutorial is super useful. Would be really appreciated if you can upload the source code of this series to youtube. Thank you so much
Hey Alex, What's the real benefit of using layouts over just views? Because for the benefit you mentioned, I could just create a render method in the BaseController, and could take care of the 3 echos in that method, which is actually superior, because then I can also do additional data passing or whatever at that level.
These are great thanks! Is the finished project in a GH repo?
Nice tutorial, thanks you Alex
You're welcome, Fernando!
Very nice and useful ! What if we have queries from database in the footer ? how should be code this ? (eg: a widget in the footer that list the blog categories)
Thank you Alex
Hey Matt, the query should be inside some method within some model.
Then use view_cell to load that model and call the method
Thank you so much
...
Hi Alex , please make a video about how to add blade template engine to codeigniter 4
Dear Alex, thank you for educating about layout. i have two questions,
1) you showed load one page using layout with 'content' tag, so each page 'content' tag to use to load layout?
2) for navigation how to load layout and content page?
1. Yes
2. Put your navigation in a separate view file "nav.php". Then inside of your layout file use
Hope that helps!
Hi, I get this error Use of $this in global code might be unatendedPHP(PHP0437). It appears if I use the extend and render method.
Can you tell me what cause this error and how to fix this?
Hi, is it possible to pass a "parent" layout to a view programmatically?
Hi Alex, can you kindly answer my previous question? how to load meta description, title in layout view.
Hey! Buddy
Take the idea from my answer that I wrote to Mussiddiq Rahman.
I meant you have to create a render section for every dinamics parte in your Layouts.
Hi Alex, thank you explaining in such detail. I've one question, how we change title of main layout page. So that every page should have separate title.
Im not really sure, but looks like the data array has the variables for the view and the layout. Hope it helps.
Hey! Buddy
I do it in this way:
1.- I create a render section called 'metaPageTitle' for example:
| My Blog
2.- To show a different title on your pages write:
Your title
I hope this can help you.
nice, Thanks
Call to undefined method CodeIgniter\View\View::extends()
I can't extend to the template
wooow. thankyou so much...
Most welcome 😊
show. kd o github codfonte ?
Hey, Manoel, at this point no I did not upload.
Very helpful thanks.
You're welcome!