Skip to content

Commit

Permalink
Merge pull request #87 from creative-commoners/pulls/4/support-custom…
Browse files Browse the repository at this point in the history
…ise-template

ENH Allow projects to define their own subclass templates
  • Loading branch information
Maxime Rainville authored Dec 4, 2023
2 parents 9debde6 + 345c828 commit 3c46dba
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 3c46dba

Please sign in to comment.