marcusamatos / jvslayout
此包的最新版本(1.0.0)没有可用的许可信息。
JvsLayout 提供了一套用于布局管理的类。
1.0.0
2015-03-12 02:25 UTC
Requires
- php: >=5.3.3
- zendframework/zendframework: >=2.2.0
This package is not auto-updated.
Last update: 2024-09-28 15:00:19 UTC
README
简介
JvsLayout 通过路由和 URI 更改布局
需求
- Zend Framework 2
安装
将 "marcusamatos/jvslayout": "1.*"
添加到 composer.json 并更新
如何使用
默认路由
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' ), ), ) ) );
配置
return array( 'jvs-layout' => array( 'uri' => array( '/news' => 'layout/news', '/admin*' => 'layout/admin' ); ); );