Where place render page code? |
First of all, you should read CI manual / documentation and from that understand what you can do / make hand-in-hand with what you need to achieve.
This forum is not meant for teaching you understand programming and developing, or do a work for you, but for solving issues and helping each other. https://codeigniter4.github.io/CodeIgnit...youts.html https://codeigniter4.github.io/CodeIgnit...dules.html Long story short: Extend controller to some kind of base controller, where base controller always collects all "routine" stuff. Use view layouts with extending and creating sections. This is how i use CI benefits. This is jsut a basic and totally simple example. App/Controllers/BaseController.php PHP Code: <?php App/Controllers/MainController.php PHP Code: <?php App/Views/layout.php PHP Code: <!DOCTYPE html> App/Views/layout_header.php PHP Code: <head> App/Views/layout_footer.php PHP Code: <footer> App/Views/index.php PHP Code: <?=$this->extend('App\Views\layout');?> |
Messages In This Thread |
Where place render page code? - by motoroller - 11-17-2022, 12:51 AM
RE: Where place render page code? - by cb32 - 11-17-2022, 01:18 AM
RE: Where place render page code? - by motoroller - 11-17-2022, 02:52 AM
RE: Where place render page code? - by davis.lasis - 11-17-2022, 05:18 AM
RE: Where place render page code? - by Sprint - 11-17-2022, 05:42 AM
|