Preserve template directory structure inside the template variable