Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OFFI-119: Modifying template so it's SPAM filter safe #181

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>