switch template based on location path