move test for pages into each bloc to print page permalink to screen