Skip to content

Commit f90bf30

Browse files
authored
Merge pull request #7380 from mattbrailsford/uc-emailtemplates
Remove "customizing email templates" docs
2 parents 35fff59 + 9d95e9e commit f90bf30

File tree

3 files changed

+1
-173
lines changed

3 files changed

+1
-173
lines changed

13/umbraco-commerce/how-to-guides/customizing-templates.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,4 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/
1414

1515
{% file src="../.gitbook/assets/Umbraco.Commerce.Templates.v13.zip" %}
1616
Umbraco Commerce Custom Templates
17-
{% endfile %}
18-
19-
## Creating Custom Templates
20-
21-
### Email Templates
22-
23-
To Create a Custom Email Template:
24-
25-
1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.`
26-
2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce:
27-
28-
```csharp
29-
using Umbraco.Commerce.Core.Interfaces;
30-
31-
public class CustomOrderEmailTemplate : IEmailTemplate
32-
{
33-
public virtual string FileName => "CustomOrderEmail.cshtml";
34-
}
35-
36-
```
37-
38-
3. Register the Template in a Composer:
39-
40-
```csharp
41-
using Umbraco.Cms.Core.Composing;
42-
using Umbraco.Cms.Core.DependencyInjection;
43-
44-
public class CustomTemplateComposer : IComposer
45-
{
46-
public void Compose(IUmbracoBuilder builder)
47-
{
48-
builder.EmailTemplates().Add<CustomOrderEmailTemplate>();
49-
}
50-
}
51-
52-
```
53-
54-
### Print and Export Templates
55-
56-
To create Print/Export Templates:
57-
58-
1. Create a Razor view file (`.cshtml`) under the relevant paths:
59-
60-
```
61-
/Views/Partials/Commerce/Prints/
62-
/Views/Partials/Commerce/Exports/
63-
```
64-
65-
2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce.
66-
3. Register the template in a Composer similar to the email template process.
67-
68-
## Shipping Custom Templates in a Razor Class Library
69-
70-
To distribute custom templates as part of a Razor Class Library (RCL):
71-
72-
1. Create a new Razor Class Library project.
73-
2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`.
74-
3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` .
75-
4. Use a composer to register your custom templates.
17+
{% endfile %}

15/umbraco-commerce/how-to-guides/customizing-templates.md

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,3 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/
1616
Umbraco Commerce Custom Templates
1717
{% endfile %}
1818

19-
## Creating Custom Templates
20-
21-
### Email Templates
22-
23-
To Create a Custom Email Template:
24-
25-
1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.`
26-
2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce:
27-
28-
```csharp
29-
using Umbraco.Commerce.Core.Interfaces;
30-
31-
public class CustomOrderEmailTemplate : IEmailTemplate
32-
{
33-
public virtual string FileName => "CustomOrderEmail.cshtml";
34-
}
35-
36-
```
37-
38-
3. Register the Template in a Composer:
39-
40-
```csharp
41-
using Umbraco.Cms.Core.Composing;
42-
using Umbraco.Cms.Core.DependencyInjection;
43-
44-
public class CustomTemplateComposer : IComposer
45-
{
46-
public void Compose(IUmbracoBuilder builder)
47-
{
48-
builder.EmailTemplates().Add<CustomOrderEmailTemplate>();
49-
}
50-
}
51-
52-
```
53-
54-
### Print and Export Templates
55-
56-
To create Print/Export Templates:
57-
58-
1. Create a Razor view file (`.cshtml`) under the relevant paths:
59-
60-
```
61-
/Views/Partials/Commerce/Prints/
62-
/Views/Partials/Commerce/Exports/
63-
```
64-
65-
2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce.
66-
3. Register the template in a Composer similar to the email template process.
67-
68-
## Shipping Custom Templates in a Razor Class Library
69-
70-
To distribute custom templates as part of a Razor Class Library (RCL):
71-
72-
1. Create a new Razor Class Library project.
73-
2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`.
74-
3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` .
75-
4. Use a composer to register your custom templates.

16/umbraco-commerce/how-to-guides/customizing-templates.md

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,3 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/
1616
Umbraco Commerce Custom Templates
1717
{% endfile %}
1818

19-
## Creating Custom Templates
20-
21-
### Email Templates
22-
23-
To Create a Custom Email Template:
24-
25-
1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.`
26-
2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce:
27-
28-
```csharp
29-
using Umbraco.Commerce.Core.Interfaces;
30-
31-
public class CustomOrderEmailTemplate : IEmailTemplate
32-
{
33-
public virtual string FileName => "CustomOrderEmail.cshtml";
34-
}
35-
36-
```
37-
38-
3. Register the Template in a Composer:
39-
40-
```csharp
41-
using Umbraco.Cms.Core.Composing;
42-
using Umbraco.Cms.Core.DependencyInjection;
43-
44-
public class CustomTemplateComposer : IComposer
45-
{
46-
public void Compose(IUmbracoBuilder builder)
47-
{
48-
builder.EmailTemplates().Add<CustomOrderEmailTemplate>();
49-
}
50-
}
51-
52-
```
53-
54-
### Print and Export Templates
55-
56-
To create Print/Export Templates:
57-
58-
1. Create a Razor view file (`.cshtml`) under the relevant paths:
59-
60-
```
61-
/Views/Partials/Commerce/Prints/
62-
/Views/Partials/Commerce/Exports/
63-
```
64-
65-
2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce.
66-
3. Register the template in a Composer similar to the email template process.
67-
68-
## Shipping Custom Templates in a Razor Class Library
69-
70-
To distribute custom templates as part of a Razor Class Library (RCL):
71-
72-
1. Create a new Razor Class Library project.
73-
2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`.
74-
3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` .
75-
4. Use a composer to register your custom templates.

0 commit comments

Comments
 (0)