Welcome Guest, Not a member yet? Register   Sign In
Template View Library

(This post was last modified: 03-06-2020, 10:23 AM by MatheusCastro.)

Hello everyone

Below is a library that makes it easy to work with templates in Codeigniter 4

How would you upload it using this library:

PHP Code:
  public function index()
                $data = [
                        'page_title' => 'Your title'

                // Here

Link is here: <https://github.com/matheuscastroweb/ci4-template-view>

I think you may have missed the new View Layouts in CI4.

(03-06-2020, 02:06 PM)kilishan Wrote: I think you may have missed the new View Layouts in CI4.

Hello, kilishan

I didn't like the views layouts so much.

The need to add in each view affects the maintenance issue.

I used this library in Codeigniter v3, I rewrote it for use in v4 because I found it practical and useful.

As I understand it, the use of:

PHP Code:
<?= $this->extend('default'?>

It can be used only inside the View, in my opinion, this is more practical in the Controllers, leaving the View files just to "display", very transparent.

Well, of course this is a personal opinion. Anyway, I decided to share the Library with those interested.

No worries. Just wanted to make sure you had seen it and it sounds like you have. So thanks for sharing your library with us!

Theme © iAndrew 2016 - Forum software by © MyBB