Creating page buttons dynamically example