Skip to content

marcusamatos/jvslayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JvsLayout

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'
        );
    );
);

About

JvsLayout provides a suite of classes to layout manager.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages