For this example we have two domains:
http://www.example.com
http://subdomain.example.com
To use different templates for the subdomain, we can accomplished this with these steps:
1) Setup subdomain to point to a different directory on your server:
Domain: /home/wherever/public_html
Sub-domain: /home/wherever/public_html_subdomain
2) Copy your index.php file over to your new subdomain directory and update the CRAFT_TEMPLATES_PATH
variable to point to the location you want to have your templates. In this example, both template folders are above web root.
// index.php for domain
define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates").'/');
// index.php for subdomain
define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates_subdomain").'/');
Your template folders now look like:
/home/wherever/public_html
/home/wherever/public_html_subdomain
/home/wherever/templates
/home/wherever/templates_subdomain