add pagination directive