Template Name
You can get the name, full path, and directory path of the template used to render the entire page.
Tag | Description |
---|---|
_page.template.directory | The directory path to the template within the theme template folder. This does not include the path to the theme template folder. If the full path to your template is blog/post.twig then the directory will be blog. |
_page.template.name | The name of the template file. It does not include any file extensions. If the full path to your template is blog/post.twig then the directory will be post. |
_page.template.path | The full path to the template minus the file extension of the template file. This does not include the path to the theme template folder. If the full path to your template is blog/post.twig then the path will be blog/post |