diff --git a/10/umbraco-cms/fundamentals/design/rendering-content.md b/10/umbraco-cms/fundamentals/design/rendering-content.md index 5855d9b841a..ef3485a3bb8 100644 --- a/10/umbraco-cms/fundamentals/design/rendering-content.md +++ b/10/umbraco-cms/fundamentals/design/rendering-content.md @@ -19,16 +19,21 @@ Each property in your [Document Type](../data/defining-content/#what-is-a-docume ### Specifying types of data -You can specify the type of data being returned to help you format the value for display, consider the publish date in our example: +You can specify the type of data being returned to help you format the value for display. -To use the `` as the data return type, add the `@using Microsoft.AspNetCore.Html;` directive. +In our example, we have a string, a date and some rich text: ```html

@(Model.Value("pageTitle"))

-
@(Model.Value("bodyContent"))
+
@(Model.Value("bodyContent"))

Article date:

``` +{% hint style="info" %} +To use `IHtmlEncodedString` as the typed value, add the `@using Umbraco.Cms.Core.Strings;` directive. +{% endhint %} + + ### Using ModelsBuilder ```html diff --git a/13/umbraco-cms/fundamentals/design/rendering-content.md b/13/umbraco-cms/fundamentals/design/rendering-content.md index 752f41c341f..e8af49920d9 100644 --- a/13/umbraco-cms/fundamentals/design/rendering-content.md +++ b/13/umbraco-cms/fundamentals/design/rendering-content.md @@ -14,16 +14,20 @@ Each property in your [Document Type](../data/defining-content/#what-is-a-docume ### Specifying types of data -You can specify the type of data being returned to help you format the value for display, consider the publish date in our example: +You can specify the type of data being returned to help you format the value for display. -To use the `` as the data return type, add the `@using Microsoft.AspNetCore.Html;` directive. +In our example, we have a string, a date and some rich text: ```html

@(Model.Value("pageTitle"))

-
@(Model.Value("bodyContent"))
+
@(Model.Value("bodyContent"))

Article date:

``` +{% hint style="info" %} +To use `IHtmlEncodedString` as the typed value, add the `@using Umbraco.Cms.Core.Strings;` directive. +{% endhint %} + ### Using ModelsBuilder ```html diff --git a/14/umbraco-cms/fundamentals/design/rendering-content.md b/14/umbraco-cms/fundamentals/design/rendering-content.md index 4b5f8cdc29c..c76382ca502 100644 --- a/14/umbraco-cms/fundamentals/design/rendering-content.md +++ b/14/umbraco-cms/fundamentals/design/rendering-content.md @@ -14,16 +14,20 @@ Each property in your [Document Type](../data/defining-content/#what-is-a-docume ### Specifying types of data -You can specify the type of data being returned to help you format the value for display, consider the publish date in our example: +You can specify the type of data being returned to help you format the value for display. -To use the `` as the data return type, add the `@using Microsoft.AspNetCore.Html;` directive. +In our example, we have a string, a date and some rich text: ```html

@(Model.Value("pageTitle"))

-
@(Model.Value("bodyContent"))
+
@(Model.Value("bodyContent"))

Article date:

``` +{% hint style="info" %} +To use `IHtmlEncodedString` as the typed value, add the `@using Umbraco.Cms.Core.Strings;` directive. +{% endhint %} + ### Using ModelsBuilder ```html diff --git a/15/umbraco-cms/fundamentals/design/rendering-content.md b/15/umbraco-cms/fundamentals/design/rendering-content.md index 4b5f8cdc29c..c76382ca502 100644 --- a/15/umbraco-cms/fundamentals/design/rendering-content.md +++ b/15/umbraco-cms/fundamentals/design/rendering-content.md @@ -14,16 +14,20 @@ Each property in your [Document Type](../data/defining-content/#what-is-a-docume ### Specifying types of data -You can specify the type of data being returned to help you format the value for display, consider the publish date in our example: +You can specify the type of data being returned to help you format the value for display. -To use the `` as the data return type, add the `@using Microsoft.AspNetCore.Html;` directive. +In our example, we have a string, a date and some rich text: ```html

@(Model.Value("pageTitle"))

-
@(Model.Value("bodyContent"))
+
@(Model.Value("bodyContent"))

Article date:

``` +{% hint style="info" %} +To use `IHtmlEncodedString` as the typed value, add the `@using Umbraco.Cms.Core.Strings;` directive. +{% endhint %} + ### Using ModelsBuilder ```html