From 9d95e9eb3ae5ef4c19b8a211e4fc55b8164b5ebb Mon Sep 17 00:00:00 2001 From: Matt Brailsford Date: Thu, 4 Sep 2025 09:55:37 +0100 Subject: [PATCH] Remove misleading docs --- .../how-to-guides/customizing-templates.md | 60 +------------------ .../how-to-guides/customizing-templates.md | 57 ------------------ .../how-to-guides/customizing-templates.md | 57 ------------------ 3 files changed, 1 insertion(+), 173 deletions(-) diff --git a/13/umbraco-commerce/how-to-guides/customizing-templates.md b/13/umbraco-commerce/how-to-guides/customizing-templates.md index 08d1b79a353..8e756940441 100644 --- a/13/umbraco-commerce/how-to-guides/customizing-templates.md +++ b/13/umbraco-commerce/how-to-guides/customizing-templates.md @@ -14,62 +14,4 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/ {% file src="../.gitbook/assets/Umbraco.Commerce.Templates.v13.zip" %} Umbraco Commerce Custom Templates -{% endfile %} - -## Creating Custom Templates - -### Email Templates - -To Create a Custom Email Template: - -1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.` -2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce: - -```csharp -using Umbraco.Commerce.Core.Interfaces; - -public class CustomOrderEmailTemplate : IEmailTemplate -{ - public virtual string FileName => "CustomOrderEmail.cshtml"; -} - -``` - -3. Register the Template in a Composer: - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; - -public class CustomTemplateComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - { - builder.EmailTemplates().Add(); - } -} - -``` - -### Print and Export Templates - -To create Print/Export Templates: - -1. Create a Razor view file (`.cshtml`) under the relevant paths: - -``` -/Views/Partials/Commerce/Prints/ -/Views/Partials/Commerce/Exports/ -``` - -2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce. -3. Register the template in a Composer similar to the email template process. - -## Shipping Custom Templates in a Razor Class Library - -To distribute custom templates as part of a Razor Class Library (RCL): - -1. Create a new Razor Class Library project. -2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`. -3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` . -4. Use a composer to register your custom templates. +{% endfile %} \ No newline at end of file diff --git a/15/umbraco-commerce/how-to-guides/customizing-templates.md b/15/umbraco-commerce/how-to-guides/customizing-templates.md index 6fa75d47bbe..8e258a9e1c0 100644 --- a/15/umbraco-commerce/how-to-guides/customizing-templates.md +++ b/15/umbraco-commerce/how-to-guides/customizing-templates.md @@ -16,60 +16,3 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/ Umbraco Commerce Custom Templates {% endfile %} -## Creating Custom Templates - -### Email Templates - -To Create a Custom Email Template: - -1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.` -2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce: - -```csharp -using Umbraco.Commerce.Core.Interfaces; - -public class CustomOrderEmailTemplate : IEmailTemplate -{ - public virtual string FileName => "CustomOrderEmail.cshtml"; -} - -``` - -3. Register the Template in a Composer: - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; - -public class CustomTemplateComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - { - builder.EmailTemplates().Add(); - } -} - -``` - -### Print and Export Templates - -To create Print/Export Templates: - -1. Create a Razor view file (`.cshtml`) under the relevant paths: - -``` -/Views/Partials/Commerce/Prints/ -/Views/Partials/Commerce/Exports/ -``` - -2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce. -3. Register the template in a Composer similar to the email template process. - -## Shipping Custom Templates in a Razor Class Library - -To distribute custom templates as part of a Razor Class Library (RCL): - -1. Create a new Razor Class Library project. -2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`. -3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` . -4. Use a composer to register your custom templates. diff --git a/16/umbraco-commerce/how-to-guides/customizing-templates.md b/16/umbraco-commerce/how-to-guides/customizing-templates.md index 6fa75d47bbe..8e258a9e1c0 100644 --- a/16/umbraco-commerce/how-to-guides/customizing-templates.md +++ b/16/umbraco-commerce/how-to-guides/customizing-templates.md @@ -16,60 +16,3 @@ Download the custom templates and place them in `/Views/Partials/Commerce/Email/ Umbraco Commerce Custom Templates {% endfile %} -## Creating Custom Templates - -### Email Templates - -To Create a Custom Email Template: - -1. Create a Razor view file (`.cshtml`) in `/Views/Partials/Commerce/Email/.` -2. Implement the `IEmailTemplate` interface to make the template available in Umbraco Commerce: - -```csharp -using Umbraco.Commerce.Core.Interfaces; - -public class CustomOrderEmailTemplate : IEmailTemplate -{ - public virtual string FileName => "CustomOrderEmail.cshtml"; -} - -``` - -3. Register the Template in a Composer: - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; - -public class CustomTemplateComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - { - builder.EmailTemplates().Add(); - } -} - -``` - -### Print and Export Templates - -To create Print/Export Templates: - -1. Create a Razor view file (`.cshtml`) under the relevant paths: - -``` -/Views/Partials/Commerce/Prints/ -/Views/Partials/Commerce/Exports/ -``` - -2. Implement the `IPrintTemplate` or `IExportTemplate` interface to make the template available in Umbraco Commerce. -3. Register the template in a Composer similar to the email template process. - -## Shipping Custom Templates in a Razor Class Library - -To distribute custom templates as part of a Razor Class Library (RCL): - -1. Create a new Razor Class Library project. -2. Add the template files under appropriate paths, for example, `Views/Partials/Commerce/Emails/`. -3. Implement interfaces like `IEmailTemplate,` `IPrintTemplate,`or `IExportTemplate` . -4. Use a composer to register your custom templates.