Welcome Guest, Not a member yet? Register   Sign In
Conditional layout templates
#2

Your template can use include() to render the main content, and for your ajax call you can return only this view. See https://codeigniter4.github.io/userguide...w-partials

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

<?= $this->section('content'?>
    <?= $this->include('main_content'?>
<?= $this
->endSection() ?>
Reply


Messages In This Thread
Conditional layout templates - by legon614 - 08-20-2020, 09:32 AM
RE: Conditional layout templates - by includebeer - 08-20-2020, 02:52 PM
RE: Conditional layout templates - by InsiteFX - 08-21-2020, 02:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB