Welcome Guest, Not a member yet? Register   Sign In
View layout with two successive includes
#3

(This post was last modified: 01-10-2020, 09:19 AM by InsiteFX.)

You can still use echo view in the layout

PHP Code:
<?= view('includes/topbar'?>
<?= view
('includes/sidebar'?>

Try that, that's how it  is done in the Myth/Auth layout.

Also if you look at the include it is placed between the section and endSection.

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

<?= $this->section('content'?>
    <h1>Hello World!</h1>

    <?= $this->include('sidebar'?>
<?= $this
->endSection() ?>
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: View layout with two successive includes - by InsiteFX - 01-10-2020, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB