add paginate at gallery