added case for page directly linked
simplified edit template buttons block