Paginator And Hash

Hi guys.

Is there any way to add anchor name to pagination links?

I mean,


(This is kinda useful if paginated data is located at the bottom of the page)

Not sure how you render the pagination data, but you can normally pass the anchor target to Yii’s createUrl method this way:

$route = '/someurl';

$params = ['param'=>1, 'page'=>2, '#' => 'scrollhere'];

return $urlManager->createUrl($route, $params);

Disclaimer: Not tried this with the yii\data\Pagination class - so unsure if the createUrl function should take in the anchor like above.

Currently not, had the same request for Sort::link() already. Please create a feature request on github.