Added pagination on main gallery listview and navigation in template