private function _setTemplate($path, $type = 'site') { if ($type == 'site') { craft()->templates->setTemplatesPath($path); } if ($type == 'plugin') { craft()->templates->setTemplatesPath(craft()->path->getPluginsPath()); } }