title: How can I limit the page numbers shown in the pagination?
body: <p>I am trying to limit the shown pagination. My site has 500+ pages, and all 500+ numbers are shown in the pagination.</p>
  
  <p>I am trying to limit it like this:</p>
  
  <pre><code>Prev 1 2 3 4 5 6 Next 
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>$skin = new skin('site/pagination'); $pagination = '';
  if ($pages &gt;= 1 &amp;&amp; $page &lt;= $pages) {
      for ($x=1; $x&lt;=$pages; $x++) {
          $TMPL['pagination'] = ($x == $page) ? '&lt;strong&gt;&lt;a href="/writer/'.urlencode($name).'/'.$x.'"&gt;'.$x.'&lt;/a&gt;&lt;/strong&gt; ' : '&lt;a href="/writer/'.urlencode($name).'/'.$x.'"&gt;'.$x.'&lt;/a&gt; ';
          $pagination .= $skin-&gt;make();
      }
  }
  </code></pre>