Add feauture to limit left and right pages links in template.