Page List pagination styling

Permalink
Hi,

I am stuck here. I have been searching the core code to figure out how to change some layout styling for the pagination interface in the PageList block. In the folowing file I found some interesting lines of code:

/concrete/src/Search/Pagination/Pagination.php
public function renderDefaultView()
    {
        $v = Core::make('pagination/view');
        $list = $this->list;
        $html = $v->render(
            $this,
            function ($page) use ($list) {
                $qs = Core::make('helper/url');
                $url = $qs->setVariable($list->getQueryPaginationPageParameter(), $page);
                return $url;
            },
            array(
                'prev_message' => tc('Pagination', '← Previous'),
                'next_message' => tc('Pagination', 'Next →'),
                'active_suffix' => '<span class="sr-only">' . tc('Pagination', '(current)') . '</span>'


I would like it to look like this:
public function renderDefaultView()
    {
        $v = Core::make('pagination/view');
        $list = $this->list;
        $html = $v->render(
            $this,
            function ($page) use ($list) {
                $qs = Core::make('helper/url');
                $url = $qs->setVariable($list->getQueryPaginationPageParameter(), $page);
                return $url;
            },
            array(
                'prev_message' => tc('Pagination', '<i class="fa fa-chevron-left"></i>'),
                'next_message' => tc('Pagination', '<i class="fa fa-chevron-right"></i>'),
                'active_suffix' => '<span class="sr-only">' . tc('Pagination', '(current)') . '</span>'


I need to use the:
<i class="fa fa-chevron-right"></i>
<i class="fa fa-chevron-left"></i>
to make it look correctly.

How do I do this the correct way?

Thanks in advance...
/Michael

maar
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi maar,

I haven't tried to do this yet, but will need to in the future.

I would be very interested in seeing how it is done.
hissy replied on at Permalink Reply
hissy
I've created a pull request to fix this issue:
https://github.com/concrete5/concrete5-5.7.0/pull/2304...
MrKDilkington replied on at Permalink Reply
MrKDilkington
Excellent, this is good news.
Ta2Ta2 replied on at Permalink Reply
Amazing one hissy! i'm running version 8.0.1...whenever i add code-5php to app.php page, i get the below error in the page where the pagination is present.

Whoops\Exception\ErrorException thrown with message "Class 'Application\Src\Search\Pagination\View\Manager' not found"

Stacktrace:
#0 Whoops\Exception\ErrorException in /application/bootstrap/app.php:67x
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hissy wrote a great How-To on styling and customizing pagination in 5.7.
https://www.concrete5.org/documentation/how-tos/designers/styling-th...

Thank you, hissy.
OKDnet replied on at Permalink Reply
OKDnet
Thank you Hissy. I was just looking for exactly this information and found this.