Build the pagelist dynamically.