How do you style the paginator used in CakePHP with CSS?

How do you create a CSS page style used in CakePHP?

I can’t find a way to bind the CSS class / ID to each of the span generated by the pagination assistant in CakePHP.

+3
source share
1 answer

see http://www.switchonthecode.com/tutorials/cakephp-part-6-pagination and http://api.cakephp.org/class/paginator-helper

What stands out here is that you can pass parameters next (), prev () and numbers ()

what you want to do is pass the class parameter.

eg.

  $paginator->prev(
    '<< Previous',
    array(
      'class' => 'PrevPg'
    ),
    null,
    array(
      'class' => 'PrevPg DisabledPgLk'
    )
  ).
  $paginator->numbers(
    array(
      'class' => 'numbers'
    )
  ).
  $paginator->next(
    'Next >>',
    array(
      'class' => 'NextPg'
    ),
    null,
    array(
      'class' => 'NextPg DisabledPgLk'
    )
  ),
  array(
    'style' => 'width: 100%;'
  )
+7
source

Source: https://habr.com/ru/post/1710388/


All Articles