marcusamatos/jvslayout

There is no license information available for the latest version (1.0.0) of this package.

JvsLayout provides a suite of classes to layout manager.

1.0.0 2015-03-12 02:25 UTC

This package is not auto-updated.

Last update: 2024-04-27 12:59:38 UTC


README

Introduction

JvsLayout change layout by route and uri

Requirements

  • Zend Framework 2

Instalation

Add "marcusamatos/jvslayout": "1.*" to composer.json and update

How to use

By Route Default:

return array(
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                'route'    => '/',
                'defaults' => array(
                    'controller' => 'Application\Controller\Index',
                    'action'     => 'index',
                    'layout'     => 'layout/home'
                ),
            ),
        )
    )
);

By Config:

return array(
    'jvs-layout' => array(
        'uri' => array(
            '/news' => 'layout/news',
            '/admin*' => 'layout/admin'
        );
    );
);