Simple generator for pagination