Skip to content

PRESIDECMS-3235 add email template and email layout interception points - #1740

Open
john5onCheng wants to merge 3 commits into
pixl8:stablefrom
john5onCheng:feature-PRESIDECMS-3235_add_email_template_and_email_layout_interception_points
Open

PRESIDECMS-3235 add email template and email layout interception points#1740
john5onCheng wants to merge 3 commits into
pixl8:stablefrom
john5onCheng:feature-PRESIDECMS-3235_add_email_template_and_email_layout_interception_points

Conversation

@john5onCheng

@john5onCheng john5onCheng commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Added new interception point name postGetLayoutConfig at the end of the getLayoutConfig() function.
Added new interception point name prePrepareEmailHtmlContent at the beginning of the _prepareHtml() function, with a cacheSuffix arguments.


Note

Low Risk
Adds interception hooks and a cache-key suffix; behavior is unchanged unless interceptors are registered, with limited risk mainly around cache misses/changes in cached HTML reuse.

Overview
Adds two new custom interception points for email rendering customization: prePrepareEmailHtmlContent (announced at the start of EmailTemplateService._prepareHtml()) and postGetEmailLayoutConfig (announced at the end of EmailLayoutService.getLayoutConfig(), allowing interceptors to mutate the returned config).

Also introduces an optional cacheSuffix argument to _prepareHtml() and prefixes the template-cache key with it to avoid cross-layout cache collisions when preparing raw HTML content.

Written by Cursor Bugbot for commit 2de5961. This will update automatically on new commits. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 17

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread system/services/email/EmailTemplateService.cfc Outdated
@DominicWatson DominicWatson changed the title Feature presidecms 3235 add email template and email layout interception points PRESIDECMS-3235 add email template and email layout interception points Feb 4, 2026
Comment thread system/services/email/EmailTemplateService.cfc Outdated
Comment thread system/config/Config.cfc Outdated
interceptorSettings.customInterceptionPoints.append( "preRenderRecordForViewRecord" );
interceptorSettings.customInterceptionPoints.append( "postRenderRecordForViewRecord" );
interceptorSettings.customInterceptionPoints.append( "prePrepareEmailHtmlContent" );
interceptorSettings.customInterceptionPoints.append( "postGetLayoutConfig" );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be postGetEmailLayoutConfig

Update interception name
Corrected the cacheSuffix logic.
@DominicWatson

Copy link
Copy Markdown
Contributor

Perfect, thanks @john5onCheng - will get this merged and then hotfixed asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants