title: How to implement rel=prev and rel=next to Symfony2.3 pagination?
body: <p>I am using Symfony2.3 for my project and for pagination I am using KNP paginator Bundle.
  I want to know that How I can implement rel=prev and rel=next in our page ?</p>
  
  <p>My Controller :</p>
  
  <pre><code>&lt;?php
  
  namespace XXX\ABCBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  use Symfony\Component\HttpFoundation\Session\Session;
  use Doctrine\ORM\EntityManager;
  
  /**
   * author Siddharth Singh (siddharth.find@gmail.com)
   */
  class ArcController extends Controller {
  
  /**
   * @Route("/arch", name="_arch")
   * @Template()
   */
  public function indexAction() {
          $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
          $AArtEntity = $em-&gt;getRepository('XXXABCBundle:Arc')-&gt;findAll(array('updated'=&gt;'DESC'));
          $paginator = $this-&gt;get('knp_paginator');
          $pagination = $paginator-&gt;paginate(
                  $AArtEntity, $this-&gt;get('request')-&gt;query-&gt;get('page', 1)/* page number */, 10/* limit per page */
  
          );
  
      return array('article' =&gt; $pagination);
  }
  
  }
  </code></pre>
  
  <p>Twig File :- </p>
  
  <pre><code> {% extends 'XXXABCBundle::layout.html.twig' %}
   {% block body %}
              {% for artic in article %}
                      &lt;div class="txt"&gt;
                          &lt;p&gt;{{artic.description|striptags|titletruncate(250)}}&lt;/p&gt;
                      &lt;/div&gt;
              {% endfor %}
              &lt;div class="arcive_Paging"&gt;
                  &lt;ul class="ul_paging"&gt;
                      &lt;span class="acitve"&gt;{{ knp_pagination_render(article) }}&lt;/span&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>Thanks !</p>