public static function getDefaultPath($template, $format)
	{
		$file = $template . '.' . $format;
		$container = System::getContainer();
		$rootDir = $container->getParameter('kernel.project_dir');

		if (isset(self::$files[$template]))
		{
			return $rootDir . '/' . self::$files[$template] . '/' . $file;
		}

		$strPath = null;

		try
		{
			// Search for the template if it is not in the lookup array (last match wins)
			foreach ($container->get('contao.resource_finder')->findIn('templates')->name($file) as $file)
			{
				/** @var SplFileInfo $file */
				$strPath = $file->getPathname();
			}
		}
		catch (\InvalidArgumentException $e) {}

		if ($strPath !== null)
		{
			return $strPath;
		}

		throw new \Exception('Could not find template "' . $template . '"');
	}