title: Custom Pagination in Cake PHP
body: <p>i'm a beginner in cakePHP , and i wan't to create a custom pagination in cakePHP .</p>
  
  <p>the function <code>$paginator-&gt;numbers() ;</code> it displays the page numbers like this : </p>
  
  <pre><code>1 | 2 | 3 | 4 | ...
  </code></pre>
  
  <p>by looking in the options , there is some options to change the separator, to add a class of a style css ..Etc .</p>
  
  <p>what i want is to have my pagination like this : </p>
  
  <pre><code>1-20 21-40 41-60 61-80 ... &gt;&gt;
  </code></pre>
  
  <p>some one has an idea about how to code it ? </p>
  
  <p><strong>EDIT :</strong> </p>
  
  <p>i've created the custom paginator helper in : <code>app/View/Helper/</code>  ,</p>
  
  <p>and i've added my <code>CustomPaginatorHelper</code> to $<code>helpers</code> of my <code>Controller</code> like this : </p>
  
  <pre><code>public $helpers = array('CustomPaginator', 'Html', 'Form', 'Js');
  </code></pre>
  
  <p>but i got this error : </p>
  
  <pre><code>Fatal error: Class 'PaginatorHelper' not found in /Applications/MAMP/htdocs/QRCode/app/View/Helper/CustomPaginatorHelper.php on line 2
  </code></pre>
  
  <p>it seems that he doesn't know the <code>PaginatorHelper</code> !!! 
  Where i should add my custom <code>Paginator</code> ?? </p>
  
  <p><strong>NB :</strong> your function numbers() will display just the format of the pagination : 1-20 21-40 ...etc , but without links to the pages i think :)</p>
  
  <p><strong>EDIT 2 :</strong> </p>
  
  <p>i've added <code>App::set('PaginatorHelper','/View/Helper/');</code> and i don't get this error anymore.
  Now i try to call the <code>numbers()</code> method of the custom paginator like this : </p>
  
  <pre><code>$this-&gt;CustomPaginator-&gt;numbers(); 
  </code></pre>
  
  <p>but i get this error : </p>
  
  <pre><code>Fatal error: Call to a member function numbers() on a non-object in /Applications/MAMP/htdocs/QRCode/app/View/Codes/index.ctp on line 71
  </code></pre>
  
  <p>what is the source of this error ? i've tried to add my customPaginatorHelper to the $helpers variable of my Controller but i still get the same error ; any ideas ? </p>
  
  <p>thanks in advance</p>