How to use variables for pagination?

Thanks for the quick fix!