{"action":"closed","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7842","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7842/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7842/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7842/events","html_url":"https://github.com/cakephp/cakephp/issues/7842","id":121938438,"number":7842,"title":"3.0 - Can't use Paginator::last() & Paginator::first() with a number and the original template","user":{"login":"Xety","id":8210023,"avatar_url":"https://avatars.githubusercontent.com/u/8210023?v=3","gravatar_id":"","url":"https://api.github.com/users/Xety","html_url":"https://github.com/Xety","followers_url":"https://api.github.com/users/Xety/followers","following_url":"https://api.github.com/users/Xety/following{/other_user}","gists_url":"https://api.github.com/users/Xety/gists{/gist_id}","starred_url":"https://api.github.com/users/Xety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xety/subscriptions","organizations_url":"https://api.github.com/users/Xety/orgs","repos_url":"https://api.github.com/users/Xety/repos","events_url":"https://api.github.com/users/Xety/events{/privacy}","received_events_url":"https://api.github.com/users/Xety/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/68","html_url":"https://github.com/cakephp/cakephp/milestones/3.1.6","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/68/labels","id":1434393,"number":68,"title":"3.1.6","description":"Bugfixes and optimizations for the 3.1 branch","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":56,"state":"open","created_at":"2015-11-30T03:21:51Z","updated_at":"2015-12-13T20:26:14Z","due_on":"2015-12-22T05:00:00Z","closed_at":null},"comments":1,"created_at":"2015-12-13T19:35:20Z","updated_at":"2015-12-13T20:26:14Z","closed_at":"2015-12-13T20:26:14Z","body":"Hello,\r\n\r\nI wanted to use a custom template with the helper function `Paginator::last()` & `Paginator::first()` **and** with a number :\r\n\r\n```php\r\n'Paginator' => [\r\n        'templates' => [\r\n                'last' => '<li class=\"last\"><a href=\"{{url}}\" data-original-title=\"Last Page\" data-toggle=\"tooltip\" data-placement=\"top\" data-container=\"body\">{{text}}</a></li>',\r\n                'first' => '<li class=\"first\"><a href=\"{{url}}\" data-original-title=\"First Page\" data-toggle=\"tooltip\" data-placement=\"top\" data-container=\"body\">{{text}}</a></li>'\r\n        ]\r\n]\r\n```\r\nNote that the `first` and `last` templates are different.\r\n\r\n```php\r\n<?php if ($this->Paginator->hasPrev()): ?>\r\n        <?= $this->Paginator->first(1); ?>\r\n        <?= $this->Paginator->prev('«'); ?>\r\n<?php endif; ?>\r\n<?= $this->Paginator->numbers(['modulus' => 4]); ?>\r\n<?php if ($this->Paginator->hasNext()): ?>\r\n        <?= $this->Paginator->next('»'); ?>\r\n        <?= $this->Paginator->last(1); ?>\r\n<?php endif; ?>\r\n```\r\n\r\nBut i can't because when we use the functions `Paginator::last()` & `Paginator::first()` with a number it use the `number` template, ref : https://github.com/cakephp/cakephp/blob/master/src/View/Helper/PaginatorHelper.php#L968-L974\r\nand there's no option to specify a custom template."}}