How can I make a template output its own filename? Is it possible to output the template name being used? Using a global variable or something similar? I am wanting to check which template is being used in a conditional.
You can get the current template’s name like so:

{{ _self.getTemplateName() }}