Skip to content

Commit

Permalink
Merge pull request KnpLabs#489 from paul-mesnilgrente/size-twitter-v4
Browse files Browse the repository at this point in the history
adding size option for bootstrap v4, issue KnpLabs#488
  • Loading branch information
nicolasmure authored May 16, 2018
2 parents 3491e17 + 0fe73e3 commit f4ece5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Resources/doc/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ If you need custom parameters in pagination template, use:
// set an array of custom parameters
$pagination->setCustomParameters(array(
'align' => 'center', # center|right (for template: twitter_bootstrap_v4_pagination)
'size' => 'large', # small|large (for template: twitter_bootstrap_v4_pagination)
'style' => 'bottom',
'span_class' => 'whatever'
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#}
{% if pageCount > 1 %}
<nav>
<ul class="pagination{{ (align is not defined) ? '' : align=='center' ? ' justify-content-center' : (align=='right' ? ' justify-content-end' : '') }}">
{% set classAlign = (align is not defined) ? '' : align=='center' ? ' justify-content-center' : (align=='right' ? ' justify-content-end' : '') %}
{% set classSize = (size is not defined) ? '' : size=='large' ? ' pagination-lg' : (size=='small' ? ' pagination-sm' : '') %}
<ul class="pagination{{ classAlign }}{{ classSize }}">

{% if previous is defined %}
<li class="page-item">
Expand Down

0 comments on commit f4ece5b

Please sign in to comment.