Made variable checks in page template.