|
4 | 4 | PHP Paginator with Pager Widget (pure PHP, CI, Yii, Laravel support)
|
5 | 5 |
|
6 | 6 | [](https://packagist.org/packages/yidas/pagination)
|
7 |
| -[](https://packagist.org/packages/yidas/pagination) |
8 | 7 | [](https://packagist.org/packages/yidas/pagination)
|
9 | 8 |
|
10 | 9 | Features
|
@@ -236,18 +235,29 @@ echo Pagination::widget([
|
236 | 235 |
|
237 | 236 | #### Customized View
|
238 | 237 |
|
239 |
| -The default widget view is for Bootstrap(`bootstrap`), you could customized your pagination view then set into Pagination Widget. |
| 238 | +The default widget view is for Bootstrap(`bootstrap`), you could choose a template view for your Pagination Widget: |
240 | 239 |
|
241 | 240 | ```php
|
242 |
| -use yidas\widgets\Pagination; |
243 |
| - |
244 |
| -echo Pagination::widget([ |
| 241 | +echo \yidas\widgets\Pagination::widget([ |
245 | 242 | 'pagination' => $pagination,
|
246 |
| - 'view' => $appPagerViewPath, |
| 243 | + 'view' => 'simple', |
247 | 244 | ]);
|
248 | 245 | ```
|
249 | 246 |
|
250 |
| -> You could also choose library's template view: `bootstrap`, `simple` |
| 247 | +|Template |Description| |
| 248 | +|:--------|:----------| |
| 249 | +|bootstrap|Default view, supports for Bootstrap 3 and 4| |
| 250 | +|simple |Simple `<div>` with `<a>` tags for pure HTML/CSS style| |
| 251 | + |
| 252 | + |
| 253 | +You can also use your customized view for Pagination widget: |
| 254 | + |
| 255 | +```php |
| 256 | +echo \yidas\widgets\Pagination::widget([ |
| 257 | + 'pagination' => $pagination, |
| 258 | + 'view' => __DIR__ . '/../widgets/pagination_view.php', |
| 259 | +]); |
| 260 | +``` |
251 | 261 |
|
252 | 262 | #### Inheritance
|
253 | 263 |
|
@@ -426,7 +436,7 @@ API DOCUMENTATION
|
426 | 436 | |$pageCssClass|string |The CSS class for the each page button, default value is `page-item`|
|
427 | 437 | |$ulCssClass |string |The CSS class for the ul element of pagination. For example, 'pagination-sm' for Bootstrap small size.|
|
428 | 438 | |$linkAttributes|array |HTML attributes for the link in a pager container tag, default value is ['class' => 'page-link']|
|
429 |
| -|$view |string |The view name or absolute file path that can be used to render view. (Template: `bootstrap`, `simple`)| |
| 439 | +|$view |string |The view name or absolute file path that can be used to render view. ([Template view choices](#customized-view))| |
430 | 440 |
|
431 | 441 | ---
|
432 | 442 |
|
|
0 commit comments