Get section content
Last updated: Mar 28, 2024


This function is used in practically every Webigniter website. It is used to include all sections attached to the current page. Usually you will call this function within your layout file.


When in your layout file, place the following snippet on the location where you want to include your section files.

<?php $webigniter->getSectionsContent(); ?>

This will include all attached sections on this page on this location in the code.

If you need to, you can add your own data as well, to be passed to your section files.


$extraData = [
   'first_name' => 'John',
   'last_name' => 'Doe'


You see you can create a php array and pass it to the getSectionsContent() function. Now you can use the variables $first_name and $last_name in any of the included sections. And they will hold the names 'John' and 'Doe'.

Table of Contents
  1. Introduction
  2. Usage