From 05fe2516976ac8eeb9b4f2ff1e5b39f824fc3c35 Mon Sep 17 00:00:00 2001 From: Pavel Mironchik Date: Sun, 17 Jan 2021 17:58:59 +0600 Subject: [PATCH] Fix getting a document template for modules. --- app/Abstracts/View/Components/DocumentShow.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index 1f2cb8c7d..15a41f08a 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -566,6 +566,10 @@ abstract class DocumentShow extends Base return $template; } + if (!empty($alias = config('type.' . $type . '.alias'))) { + $type = $alias . '.' . str_replace('-', '_', $type); + } + $documentTemplate = setting($type . '.template') ?: 'default'; return $documentTemplate;