Skip to content

Commit

Permalink
Modifying template so it's SPAM filter safe
Browse files Browse the repository at this point in the history
  • Loading branch information
wAsnk committed Sep 20, 2024
1 parent 975eea1 commit aa6655c
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 aa6655c

Please sign in to comment.