public static function getPluginByName($name) {

		$db = Database::getInstance();
		$db->setQuery('SELECT * FROM `templates` WHERE name=?');
		$obj = $db->loadObject($name);
		return (is_a($obj, 'stdClass') ? new Template($obj) : NULL);
		
	}