PHPackages                             tatter/layouts - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tatter/layouts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tatter/layouts
==============

Layout management service for CodeIgniter 4

v1.0.0(3y ago)543.2k↓31.6%1[1 PRs](https://github.com/tattersoftware/codeigniter4-layouts/pulls)2MITPHPPHP ^7.4 || ^8.0

Since Nov 29Pushed 2y ago3 watchersCompare

[ Source](https://github.com/tattersoftware/codeigniter4-layouts)[ Packagist](https://packagist.org/packages/tatter/layouts)[ Docs](https://github.com/tattersoftware/codeigniter4-layouts)[ Fund](https://paypal.me/tatter)[ GitHub Sponsors](https://github.com/tattersoftware)[ RSS](/packages/tatter-layouts/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (6)Used By (2)

Tatter\\Layouts
===============

[](#tatterlayouts)

Layout management service for CodeIgniter 4

[![](https://github.com/tattersoftware/codeigniter4-layouts/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-layouts/actions/workflows/test.yml)[![](https://github.com/tattersoftware/codeigniter4-layouts/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-layouts/actions/workflows/analyze.yml)[![](https://github.com/tattersoftware/codeigniter4-layouts/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-layouts/actions/workflows/inspect.yml)[![Coverage Status](https://camo.githubusercontent.com/5ca157c78b388f39795653d9459bd21910dc65fa52a31c9f8115d679d93e9164/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f746174746572736f6674776172652f636f646569676e69746572342d6c61796f7574732f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/tattersoftware/codeigniter4-layouts?branch=develop)

Description
-----------

[](#description)

This library provides a commons means of managing [View Layouts](https://codeigniter.com/user_guide/outgoing/view_layouts.html)across package modules and applications.

Installation
------------

[](#installation)

Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:

- `> composer require tatter/layouts`

Or, install manually by downloading the source files and adding the directory to `app/Config/Autoload.php`.

Configuration
-------------

[](#configuration)

The code of `Layouts` amounts to a single config file: `Tatter\Layouts\Config\Layouts`. This file provides the path for each layout as a property. Initially the config file only includes a single property: "default". By supplying your own path via an `App` config file you can direct any package or module using `Layouts` to use your layout instead. For example, **app/Config/Layouts.php**:

```
