adds page links dynamically, according to the visiblie results and the number of files