Skip to content

Commit

Permalink
ENH Allow projects to define their own subclass templates
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz authored and Maxime Rainville committed Dec 4, 2023
1 parent 9debde6 commit 345c828
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

/**
Expand Down

0 comments on commit 345c828

Please sign in to comment.