Welcome Guest, Not a member yet? Register   Sign In
CI4 beta.1 - How to load view in view with layout
#1

Hello,

In beta 1, how can I load a partial view in a view with layout?

When I use this code, nothing is rendered. 
PHP Code:
<?= $this->extend('layout'?>

<?= $this->section('content'?>
    <?= view('partial'); ?>
    <h1>Hello World!</h1>
<?= $this->endSection() ?>


But without layout, it will work.
PHP Code:
<?= view('partial'); ?>
<h1>Hello World!</h1> 
Reply


Messages In This Thread
CI4 beta.1 - How to load view in view with layout - by pinebranch - 03-08-2019, 01:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB