PHPackages                             mstrychalski/ms-layout-variables - 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. mstrychalski/ms-layout-variables

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

mstrychalski/ms-layout-variables
================================

MsViewElements is simple ZF3 module for managing layout variables from module configs

07PHP

Since Sep 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mstrychalski/MsLayoutVariables)[ Packagist](https://packagist.org/packages/mstrychalski/ms-layout-variables)[ RSS](/packages/mstrychalski-ms-layout-variables/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MsLayoutVariables
=================

[](#mslayoutvariables)

Created by Michał Strychalski

Introduction
------------

[](#introduction)

MsLayoutVariables is simple Module, that allows you to set layout variables in module configs. Usefull for hiding or rendering particular elements in layout, depends on controller or module.

Installation using Composer
---------------------------

[](#installation-using-composer)

```
$ composer require mstrychalski/ms-layout-variables
```

Usage
-----

[](#usage)

Layout variables can be used in various ways, it can be limited for Action only, Module, Controller or even whole application.

### Whole application

[](#whole-application)

```
'layout_variables' => [
        'default' => [
            'showMenu' => false,
            'pageTitle' => 'Awesome title',
            'someArray' => [0,1,2,3]
        ]
    ],
```

### Limited to Module

[](#limited-to-module)

```
'layout_variables' => [
        'Application' => [
            'showMenu' => false,
            'pageTitle' => 'Awesome title',
            'someArray' => [0,1,2,3]
        ]
    ],
```

### Limited to Controller in local namespace

[](#limited-to-controller-in-local-namespace)

```
'layout_variables' => [
        Controller\IndexController::class => [
            'default' => [
                'showMenu' => false,
                'pageTitle' => 'Awesome title',
                'someArray' => [0,1,2,3]
            ]
        ]
    ],
```

### Or somewhere else

[](#or-somewhere-else)

```
'layout_variables' => [
        \Blog\Controller\IndexController::class => [
            'default' => [
                'showMenu' => false,
                'pageTitle' => 'Awesome title',
                'someArray' => [0,1,2,3]
            ]
        ]
    ],
```

### Limited to Action

[](#limited-to-action)

```
'layout_variables' => [
        Controller\IndexController::class => [
            'index' => [
                'showMenu' => false,
                'pageTitle' => 'Awesome title',
                'someArray' => [0,1,2,3]
            ]
        ]
    ],
```

### And now you can use it in your layout:

[](#and-now-you-can-use-it-in-your-layout)

```
showMenu !== false) ?>

```

This is all, happy haking

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce7b9cd83ff13d15ace045dbf405f80fe870d52f9a756f24f29743408ea23bce?d=identicon)[mstrychalski](/maintainers/mstrychalski)

---

Top Contributors

[![mstrychalski](https://avatars.githubusercontent.com/u/12812719?v=4)](https://github.com/mstrychalski "mstrychalski (6 commits)")

### Embed Badge

![Health badge](/badges/mstrychalski-ms-layout-variables/health.svg)

```
[![Health](https://phpackages.com/badges/mstrychalski-ms-layout-variables/health.svg)](https://phpackages.com/packages/mstrychalski-ms-layout-variables)
```

###  Alternatives

[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M34](/packages/shipmonk-name-collision-detector)[bostondv/bootstrap-ninja-forms

Adds Bootstrap classes to Ninja Forms

222.2k](/packages/bostondv-bootstrap-ninja-forms)

PHPackages © 2026

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