From 345c828ab1d65cdf06febf5cfc950c46ed11719f Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 26 Sep 2023 17:22:51 +1300 Subject: [PATCH] ENH Allow projects to define their own subclass templates --- src/Models/Link.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Models/Link.php b/src/Models/Link.php index 78e9cb55..47df3169 100644 --- a/src/Models/Link.php +++ b/src/Models/Link.php @@ -259,7 +259,9 @@ public function loadLinkData(array $data): Link */ public function forTemplate() { - return $this->renderWith([self::class]); + // First look for a subclass of the email template e.g. EmailLink.ss which may be defined + // in a project. Fallback to using the generic Link.ss template which this module provides + return $this->renderWith([static::class, self::class]); } /**