dev-master
9999999-dev https://github.com/mstrychalski/MsLayoutVariablesMsViewElements is simple ZF3 module for managing layout variables from module configs
The Requires
- php >=5.3
by MichaĆ Strychalski
zf3
Wallogit.com
2017 © Pedro PelĂĄez
MsViewElements is simple ZF3 module for managing layout variables from module configs
Created by MichaĆ Strychalski, (*1)
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., (*2)
$ composer require mstrychalski/ms-layout-variables
Layout variables can be used in various ways, it can be limited for Action only, Module, Controller or even whole application., (*3)
'layout_variables' => [
'default' => [
'showMenu' => false,
'pageTitle' => 'Awesome title',
'someArray' => [0,1,2,3]
]
],
'layout_variables' => [
'Application' => [
'showMenu' => false,
'pageTitle' => 'Awesome title',
'someArray' => [0,1,2,3]
]
],
'layout_variables' => [
Controller\IndexController::class => [
'default' => [
'showMenu' => false,
'pageTitle' => 'Awesome title',
'someArray' => [0,1,2,3]
]
]
],
'layout_variables' => [
\Blog\Controller\IndexController::class => [
'default' => [
'showMenu' => false,
'pageTitle' => 'Awesome title',
'someArray' => [0,1,2,3]
]
]
],
'layout_variables' => [
Controller\IndexController::class => [
'index' => [
'showMenu' => false,
'pageTitle' => 'Awesome title',
'someArray' => [0,1,2,3]
]
]
],
<?php if($this->showMenu !== false) ?>
<div class="awesomeMenu"></div>
<?php endif; ?>
This is all, happy haking, (*4)
MsViewElements is simple ZF3 module for managing layout variables from module configs
zf3