PHPackages                             eisteeee/sectioned-view - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. eisteeee/sectioned-view

ActiveLibrary[Templating &amp; Views](/categories/templating)

eisteeee/sectioned-view
=======================

layout inheritance and sections in php's native templates

v1.3(11y ago)031MITPHPPHP &gt;=5.3.0

Since Mar 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/eisteeee/SectionedView)[ Packagist](https://packagist.org/packages/eisteeee/sectioned-view)[ Docs](http://github.com/eisteeee/SectionedView)[ RSS](/packages/eisteeee-sectioned-view/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

SectionedView
=============

[](#sectionedview)

SectionedView implements layout inheritance and sections in php's native templates. It aims to be simple an easy to integrate

\##Features

- Integrates seamlessly with php's native templating (à la ``)
- easy to integrate with frameworks such as [Slim PHP](http://www.slimframework.com/)

Getting Started
---------------

[](#getting-started)

\###Install

I recommend you install SectionedView via Composer:

composer.json:

```
"require": {
  "eisteee/sectioned-view": "~1.0"
}

```

or using the command line

```
composer require eisteee/sectioned-view

```

\###Requirements

Only *PHP &gt;= 5.3.0* is required

\###Quick Tutorial

Instantiate a SectionedView renderer:

```
$template_path = __DIR__ . "/templates"; //absolute path to your template directory
$view = new \SectionedView\View($template_path);
$view->render("hello.php", array('name' => 'World'));

```

templates/hello.php:

```
Hello, !

```

renders

```
Hello, World!

```

in order to return the rendered contents instead of printing them to output directly use:

```
$template_path = __DIR__ . "/templates"; //absolute path to your template directory
$view = new \SectionedView\View($template_path, array('echo' => 'false'));
$view->render("hello.php", array('name' => 'World'));

```

\###Using layouts &amp; sections

considering the same setup as above, now we will use a layout file

templates\\layout.php:

```

   Hello

```

templates\\hello.php:

```

   Hello, !

```

will render:

```

   Hello

   Hello, World!

```

\###Slim PHP Views

a view class for use in [Slim PHP](http://www.slimframework.com/) projects can be achieved as follows:

```
class SectionedSlimView extends \Slim\View
{
    private $sectionedView;
    public function __construct($template_base)
    {
        parent::__construct();
        $this->sectionedView = new \SectionedView\View($template_base);
    }

    public function render($template)
    {
        $this->sectionedView->render($template, $this->data->all());
    }
}

```

register it as your Slim view:

```
$template_path = __DIR__ . "/templates"; /* path relative to specified template_path in SectionedView */
$app = new \Slim\Slim(array(
    "view" => new SectionedSlimView($template_path);
));

```

and you are good to go

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

4080d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e06417da5e241bdea6cffe21203dbae952e3e2a0597ab867805217c642ca0af?d=identicon)[eisteeee](/maintainers/eisteeee)

---

Top Contributors

[![FelixBreitweiser](https://avatars.githubusercontent.com/u/147688598?v=4)](https://github.com/FelixBreitweiser "FelixBreitweiser (12 commits)")[![eisteeee](https://avatars.githubusercontent.com/u/3106528?v=4)](https://github.com/eisteeee "eisteeee (1 commits)")

---

Tags

layoutsectionsviews

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eisteeee-sectioned-view/health.svg)

```
[![Health](https://phpackages.com/badges/eisteeee-sectioned-view/health.svg)](https://phpackages.com/packages/eisteeee-sectioned-view)
```

###  Alternatives

[league/plates

Plates, the native PHP template system that's fast, easy to use and easy to extend.

1.5k5.9M232](/packages/league-plates)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[igaster/laravel-theme

Laravel Themes: Asset &amp; Views folder per theme. Theme inheritance. Blade integration and more...

5161.2M12](/packages/igaster-laravel-theme)[teepluss/theme

Theme will help you organize your themes inside Laravel projects easily and maintain its related assets, layouts and partials for the theme in single directory.

543174.1k8](/packages/teepluss-theme)[duncan3dc/blade

Use Laravel Blade templates without the full Laravel framework

160499.5k24](/packages/duncan3dc-blade)[phug/phug

Pug (ex-Jade) facade engine for PHP, HTML template engine structured by indentation

67292.2k13](/packages/phug-phug)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
