Welcome Guest, Not a member yet? Register   Sign In
How to renderSection work multiple time in CodeIgniter 4?

I am trying to render my section twice on the same page. But, the second time, it's returning NULL

<?= $this->extend('admin/layout') ?>
<?= $this->section('title') ?>
    Page Title
<?= $this->endSection('title') ?>
<?= $this->section('content') ?>
  <div class="content-wrapper">
    <div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0"><?=$this->renderSection('title')?></h1>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="javascript:void">Home</a></li>
            <li class="breadcrumb-item active">**<?=$this->renderSection('title')."<<<<< Not print here"?>**</li>

You need to add the endSection after each section displayed.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Theme © iAndrew 2016 - Forum software by © MyBB