Skip to content

Commit

Permalink
Merge pull request #181 from Lombiq/issue/OFFI-119
Browse files Browse the repository at this point in the history
OFFI-119: Modifying template so it's SPAM filter safe
  • Loading branch information
sarahelsaig authored Sep 30, 2024
2 parents ff2e958 + 58bde60 commit 48126da
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Lombiq.HelpfulExtensions/Views/Layout-EmailTemplate.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@{
const string blockName = "emailTemplate";
}

<!DOCTYPE html>
<html lang="@Orchard.CultureName()">
<head>
Expand All @@ -13,32 +12,41 @@
<title>
<shape type="EmailTemplate_Title"></shape>
</title>

<style>
.preHeader {
display: none;
max-height: 0;
overflow: hidden;
}
</style>
@await RenderSectionAsync("Head", required: false)

<shape type="EmailTemplate_LayoutInjections" prop-layoutModel="@Model"></shape>
</head>
<body>

<span class="preheader" style="display: none; max-height: 0px; overflow: hidden;"> @* #spell-check-ignore-line *@
@await RenderSectionAsync("Preheader", required: false) @* #spell-check-ignore-line *@
@if (Model.PreHeader != null)
{
<span class="preHeader">
@await RenderSectionAsync("PreHeader", required: false)
</span>

}
<div class="@(blockName)">
@if (Model.Header != null)
{
<div class="@(blockName)__header">
@await RenderSectionAsync("Header", required: false)
</div>

}
<div class="@(blockName)__content">
@await RenderSectionAsync("BeforeContent", required: false)
@await RenderBodyAsync()
@await RenderSectionAsync("AfterContent", required: false)
</div>

@if(Model.Footer != null)
{
<div class="@(blockName)__footer">
@await RenderSectionAsync("Footer", required: false)
</div>
}
</div>

</body>
</html>

0 comments on commit 48126da

Please sign in to comment.