Check empty links and pagination in templates

Change-Id: Ie8180300acb20af4cfda68cd80817426f1bf68ea
Merge "Check empty links and pagination in templates" into frontend-rewrite