ajax page template

As it seems, it’s an easier way, using get_template_part and some php magic.
What you do is get the page name from post_metadata filter the filename without the extension and add it to get_template_part. Of course all your data must conform a predefined variable (or just pass the id to the template) because you have to use a global $post or a global $ID on the page template to retrieve that variable.