If I am understanding you correctly you could use get_page_template_slug(). For example…
<?php echo get_page_template_slug( $post->ID ); ?>
Although, to be honest I don’t see the point of doing this over using body_class().
If I am understanding you correctly you could use get_page_template_slug(). For example…
<?php echo get_page_template_slug( $post->ID ); ?>
Although, to be honest I don’t see the point of doing this over using body_class().