Skip to content

Commit 6ae771d

Browse files
committed
Added documentation
1 parent 82aa4ed commit 6ae771d

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
11
HtMobileTemplateModule
22
======================
33

4-
A Zend Framework 2 module to based on Mobile-Detect library to easily use different templates for mobiles, tablets etc.
4+
A Zend Framework 2 module to based on [Mobile-Detect](https://github.com/serbanghita/Mobile-Detect) library to easily use different templates for mobiles, tablets etc.
5+
6+
# Requirements
7+
1. [Zend Framework 2](https://github.com/zendframework/zf2)
8+
2. [Mobile-Detect](https://github.com/serbanghita/Mobile-Detect)
9+
3. [zf2-mobile-detect](https://github.com/neilime/zf2-mobile-detect)
10+
4. [HtTemplateResolverModule](https://github.com/hrevert/HtTemplateResolverModule)
11+
12+
13+
# Installation
14+
* Add `"hrevert/ht-mobile-template-module": "dev-master",` to your composer.json and run `php composer.phar update`
15+
* Enable the module in `config/application.config.php`
16+
17+
## Basic Usage
18+
```php
19+
<?php
20+
return [
21+
'ht_mobile_template' => [
22+
'path_stack' => [
23+
'mobile' => [
24+
__DIR__ . '../view/mobile/',
25+
__DIR__ . '../../AnotherModule/view/mobile/',
26+
],
27+
'tablet' => [
28+
__DIR__ . '../view/tablet/',
29+
__DIR__ . '../../AnotherModule/view/tablet/',
30+
]
31+
],
32+
'map' => [
33+
'mobile' => [
34+
'application/index/index' => __DIR__ . '../view/mobile/application/index/index.phtml',
35+
],
36+
'tablet' => [
37+
'application/index/index' => __DIR__ . '../view/tablet/application/index/index.phtml',
38+
],
39+
]
40+
]
41+
];
42+
```

0 commit comments

Comments
 (0)