Add conditional to check for civicrm page before creating