hrevert / ht-mobile-template-module
一个基于Mobile-Detect库的Zend Framework 2模块,可以轻松地为手机、平板等设备使用不同的模板。
0.1.0
2014-08-11 11:35 UTC
Requires
- php: >=5.4
- neilime/zf2-mobile-detect: 1.0
- zendframework/zend-modulemanager: ~2.1
- zendframework/zend-mvc: ~2.1
- zendframework/zend-servicemanager: ~2.1
- zendframework/zend-view: ~2.1
This package is auto-updated.
Last update: 2024-09-13 02:53:53 UTC
README
一个基于Mobile-Detect库的Zend Framework 2模块,可以轻松地为手机、平板等设备使用不同的模板。
要求
安装
- 将
"hrevert/ht-mobile-template-module": "0.0.*",
添加到您的composer.json中,并运行php composer.phar update
- 在
config/application.config.php
中启用模块
基本用法
<?php return [ 'ht_mobile_template' => [ 'path_stack' => [ 'mobile' => [ __DIR__ . '../view/mobile/', __DIR__ . '../../AnotherModule/view/mobile/', ], 'tablet' => [ __DIR__ . '../view/tablet/', __DIR__ . '../../AnotherModule/view/tablet/', ] ], 'map' => [ 'mobile' => [ 'application/index/index' => __DIR__ . '../view/mobile/application/index/index.phtml', ], 'tablet' => [ 'application/index/index' => __DIR__ . '../view/tablet/application/index/index.phtml', ], ] ] ];