Skip to content

Commit 394ed9e

Browse files
committed
ulCssClass
1 parent 3f7ab99 commit 394ed9e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ class Pagination extends BaseWidget
280280

281281
// The text label for the "previous" page button
282282
public $prevPageLabel = '<i class="fa fa-caret-left" aria-hidden="true"></i>';
283+
284+
// <ul> class. For example, 'pagination-sm' for Bootstrap small size.
285+
public $ulCssClass = '';
283286
}
284287
```
285288

@@ -419,6 +422,7 @@ API DOCUMENTATION
419422
|$nextPageCssClass|string|The CSS class for the "next" page button|
420423
|$prevPageCssClass|string|The CSS class for the "previous" page button|
421424
|$pageCssClass|string |The CSS class for the each page button, default value is `page-item`|
425+
|$ulCssClass |string |The CSS class for the ul element of pagination. For example, 'pagination-sm' for Bootstrap small size.|
422426
|$linkAttributes|array |HTML attributes for the link in a pager container tag, default value is ['class' => 'page-link']|
423427

424428
---

src/widgets/Pagination.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ class Pagination
100100
* @var array
101101
*/
102102
public $linkAttributes = ['class' => 'page-link'];
103+
104+
/**
105+
* The CSS class for the ul element of pagination
106+
*
107+
* For example, 'pagination-sm' for Bootstrap small size.
108+
*
109+
* @var string
110+
*/
111+
public $ulCssClass = '';
103112

104113
/**
105114
* Default options

src/widgets/views/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<nav aria-label="Page navigation example">
2-
<ul class="pagination <?php if($this->alignCenter):?>justify-content-center<?php endif?>">
2+
<ul class="pagination <?php if($this->alignCenter):?>justify-content-center<?php endif?> <?=$this->ulCssClass?>">
33
<?php if($this->firstPageLabel):?>
44
<li class="<?=$this->pageCssClass?> <?=$this->firstPageCssClass?> <?php if($isFirst):?>disabled<?php endif ?>">
55
<?php if($isFirst):?>

0 commit comments

Comments
 (0)