Skip to content

Commit

Permalink
ENH Allow projects to define their own sublclass templates
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 26, 2023
1 parent 7a16b8b commit e55e859
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@

// Avoid creating global variables
call_user_func(function () {

});
4 changes: 3 additions & 1 deletion src/Models/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ public function loadLinkData(array $data): JsonData
*/
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 e55e859

Please sign in to comment.