Is there a good way to determine which page template was loaded for a given URI? I'd like to be able to use this information from an add-on.
For example, if my root template group is
home and the user visits
/, I want to see that
home/index is being used. If the user visits
/foo, does EE expose information about whether it has loaded
foo/index or something else?
When using Structure, I can check for a global variable named
structure:page:template_id, and if that exists, I can easily query for that template. But if Structure isn't in use, I can't find a good way to determine which template is used.