php - Symfony2 append hash fragment parameters to the pagination URL -


i'm developing website using symfony2. i'm using knppaginationbundle paginate list of products in page. every thing working fine. couldn't find way pass additional parameters id of div section want display in website url like: localhost/my_store/web/app_dev.php/products?page=2#idsection.

i see 2 ways achieve goal , both of them connected javascript.

1) if have url localhost/website/app_dev.php/page=2#blockid try id url , scroll down js. js should smth this:

$(document).ready(function(){   var oururl = window.location.href;    var pattern = /#\w+$/;   var divid = oururl.match(pattern));   var offset = $(divid).offset();   window.scrollto(0, offset.top); }); 

2)another way paginate products ajax. approach won't need scroll somewhere.