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

(03-08-2019, 01:40 AM)pinebranch Wrote: 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> 

His error report seems to be similar to that found by me:
https://forum.codeigniter.com/thread-72967.html
Reply


Messages In This Thread
RE: CI4 beta.1 - How to load view in view with layout - by elephpantech - 03-08-2019, 10:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB