diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md index 8bad3faeb47..607939d67f6 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md @@ -56,6 +56,10 @@ Unlike other property editors, the Prevalue IDs are not directly accessible in R See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md index 85b82da608c..4e81695ad4b 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md @@ -55,6 +55,10 @@ It's possible to add a label to use with the color. See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md index 91d6d1908f8..6dfe04ded0f 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md @@ -44,6 +44,10 @@ The content picker opens a panel to pick a specific page from the content struct See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md index 663305fc1dc..d3f3c07320b 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md @@ -38,6 +38,10 @@ The second setting is "Offset time". When enabling this setting the displayed ti See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md index 169e2713ab0..7786c581e39 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md @@ -36,6 +36,10 @@ If the value of **Step Size** is not set then all decimal values between 8 and 1 See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md index e435448974e..fd7e8ece5da 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md @@ -46,6 +46,10 @@ The Email Address Property Editor does not come with any further configuration. See the example below to learn how a value can be added or changed programmatically to an Email-address property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md index 958fcd368fc..f5a4ea2afd6 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md @@ -44,6 +44,10 @@ The Eye Dropper Color picker allows you to choose a color from the full color sp See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md index 73244a0f7d4..0574991ef34 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md @@ -62,6 +62,10 @@ Instead, we recommend using the [Media Picker](media-picker-3.md) for uploading See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the [Content Service](../../../../reference/management/services/contentservice/) and the [Media Service](../../../../reference/management/services/mediaservice.md). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.IO @using Umbraco.Cms.Core.Serialization diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md index 5a976b610b4..17d1d48c635 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md @@ -47,6 +47,10 @@ There is also a Value Type: Long string if you need to set a long string value f See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @{ @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md index d0c8f99f55b..e205efda9d1 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md @@ -63,6 +63,10 @@ There are three settings available for manipulating the **Markdown editor** prop See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md index 7f22f4ba773..5d9be7186c3 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md @@ -143,6 +143,10 @@ See the example below to see how a value can be added or changed programmaticall The following sample will update a single image in a Media Picker. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md index 2fec0320702..b6345799e7a 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md @@ -82,6 +82,10 @@ When this setting is enabled, a user who doesn't normally have access to the med See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md index 1c1c88ad75d..8ea46e67385 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md @@ -39,6 +39,10 @@ The Member Group Picker opens a panel to pick one or more member groups from the See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md index 5d05b3d1855..73b36f9cf24 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md @@ -44,6 +44,10 @@ The member picker opens a panel to pick a specific member from the member sectio See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md index b243633fc9b..e38c6b531ce 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md @@ -51,6 +51,10 @@ If `Max number of items` is configured to `1` See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md index 033de09b360..ad6760644f5 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md @@ -52,6 +52,10 @@ The Repeatable textstrings property editor enables a content editor to make a li See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md index 06694a0098c..784c6533e48 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md @@ -72,6 +72,10 @@ You can also render the output by casting it to a string, which means you will n See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md index 6324a56c855..13b3cf3068d 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md @@ -42,6 +42,10 @@ Pretty much like the name indicates this Data type enables editors to choose fro See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md index 3c7ca8ee7f7..a0daa0747c0 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md @@ -59,6 +59,10 @@ There are two flavors of the slider. One with a single value picker. One with a See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ### With a range off ```csharp diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md index b89ba5c8c57..fb56ab8fce5 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md @@ -69,6 +69,10 @@ Whenever a tag has been added it will be visible in the typeahead when you start You can use the ContentService to create and update Umbraco content from c# code, when setting tags there is an extension method (SetTagsValue) on IContentBase that helps you set the value for a Tags property. Remember to add the using statement for `Umbraco.Core.Models` to take advantage of it. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md index 5273560b02a..e2c479fcb60 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md @@ -53,6 +53,10 @@ Textarea is an HTML textarea control for multiple lines of text. It can be confi See the example below to learn how a value can be added or changed programmatically to a Textarea property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md index 1082138f72e..b6d3e12e431 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md @@ -51,6 +51,10 @@ Textbox is an HTML input control for text. It can be configured to have a fixed See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md index e08b95e5fa6..02ffbc9ac18 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md @@ -44,6 +44,10 @@ It is also possible to define a label, that will be displayed next to the checkb See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md index cec36f7f02d..003b6c22df7 100644 --- a/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md +++ b/10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md @@ -60,6 +60,10 @@ Getting the Value of the property will return the user ID - properties of the Us See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @{ diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md index ee6526b974f..d7e0d6a1f5e 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md @@ -56,6 +56,10 @@ Unlike other property editors, the Prevalue IDs are not directly accessible in R See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md index f1d1deff761..9c6365892a7 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md @@ -55,6 +55,10 @@ It's possible to add a label to use with the color. See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md index d67c00280f0..626f9ca048c 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md @@ -44,6 +44,10 @@ The content picker opens a panel to pick a specific page from the content struct See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md index ba6256e0106..30808ce4862 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md @@ -38,6 +38,10 @@ The second setting is "Offset time". When enabling this setting the displayed ti See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md index 180cbcb545d..a393e76248e 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md @@ -36,6 +36,10 @@ If the value of **Step Size** is not set then all decimal values between 8 and 1 See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md index e7495634c5f..7beaf17f5d9 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md @@ -45,6 +45,10 @@ The Email Address Property Editor does not come with any further configuration. See the example below to learn how a value can be added or changed programmatically to an Email-address property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md index 7ee6f8f0bd7..c0fa88a2d1e 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md @@ -44,6 +44,10 @@ The Eye Dropper Color picker allows you to choose a color from the full color sp See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md index 9d0b4903551..cdf64fbd205 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md @@ -62,6 +62,10 @@ Instead, we recommend using the [Media Picker](media-picker-3.md) for uploading See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the [Content Service](../../../../reference/management/services/contentservice/) and the [Media Service](../../../../reference/management/services/mediaservice.md). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.IO @using Umbraco.Cms.Core.Serialization diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md index 6c23908dc3d..a5cf504c719 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md @@ -47,6 +47,10 @@ There is also a Value Type: Long string if you need to set a long string value f See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @{ @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md index b22e5d1d4a6..1900fc564d4 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md @@ -63,6 +63,10 @@ There are three settings available for manipulating the **Markdown editor** prop See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md index 592dcea8bf1..494fa66023a 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md @@ -143,6 +143,10 @@ See the example below to see how a value can be added or changed programmaticall The following sample will update a single image in a Media Picker. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md index 70604f5b98a..f6b33bc2b5d 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md @@ -82,6 +82,10 @@ When this setting is enabled, a user who doesn't normally have access to the med See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md index 9c81fdbadf6..8bf8da56332 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md @@ -39,6 +39,10 @@ The Member Group Picker opens a panel to pick one or more member groups from the See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md index 240c574f708..574bf12afe4 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md @@ -44,6 +44,10 @@ The member picker opens a panel to pick a specific member from the member sectio See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md index b3935e090a9..74f110a6239 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md @@ -51,6 +51,10 @@ If `Max number of items` is configured to `1` See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md index 8aee45e4597..c3adce112dd 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md @@ -52,6 +52,10 @@ The Repeatable textstrings property editor enables a content editor to make a li See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md index 54fa4fed276..6ad73a16475 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md @@ -72,6 +72,10 @@ You can also render the output by casting it to a string, which means you will n See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md index 4915a186bac..1b2de9b07f0 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md @@ -42,6 +42,10 @@ Pretty much like the name indicates this Data type enables editors to choose fro See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md index 19af569fa49..9d24b5b013a 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md @@ -69,6 +69,10 @@ Whenever a tag has been added it will be visible in the typeahead when you start You can use the ContentService to create and update Umbraco content from c# code, when setting tags there is an extension method (SetTagsValue) on IContentBase that helps you set the value for a Tags property. Remember to add the using statement for `Umbraco.Core.Models` to take advantage of it. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md index 885cd0cb4b5..4fbffd30d48 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md @@ -53,6 +53,10 @@ Textarea is an HTML textarea control for multiple lines of text. It can be confi See the example below to learn how a value can be added or changed programmatically to a Textarea property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md index a568c5dd21f..e346497a651 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md @@ -55,6 +55,10 @@ Textbox is an HTML input control for text. It can be configured to have a fixed See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md index de6a2f239ba..10672412c65 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md @@ -44,6 +44,10 @@ It is also possible to define a label, that will be displayed next to the checkb See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md index f36247ca79e..3a854156332 100644 --- a/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md +++ b/12/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md @@ -60,6 +60,10 @@ Getting the Value of the property will return the user ID - properties of the Us See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @{ diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md index ee6526b974f..d7e0d6a1f5e 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md @@ -56,6 +56,10 @@ Unlike other property editors, the Prevalue IDs are not directly accessible in R See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md index fa4d0537e01..49ffee1eb20 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md @@ -55,6 +55,10 @@ It's possible to add a label to use with the color. See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md index d67c00280f0..626f9ca048c 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md @@ -44,6 +44,10 @@ The content picker opens a panel to pick a specific page from the content struct See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md index ba6256e0106..30808ce4862 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md @@ -38,6 +38,10 @@ The second setting is "Offset time". When enabling this setting the displayed ti See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md index 180cbcb545d..a393e76248e 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md @@ -36,6 +36,10 @@ If the value of **Step Size** is not set then all decimal values between 8 and 1 See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md index e7495634c5f..7beaf17f5d9 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md @@ -45,6 +45,10 @@ The Email Address Property Editor does not come with any further configuration. See the example below to learn how a value can be added or changed programmatically to an Email-address property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md index 7ee6f8f0bd7..c0fa88a2d1e 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md @@ -44,6 +44,10 @@ The Eye Dropper Color picker allows you to choose a color from the full color sp See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md index 9d0b4903551..cdf64fbd205 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md @@ -62,6 +62,10 @@ Instead, we recommend using the [Media Picker](media-picker-3.md) for uploading See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the [Content Service](../../../../reference/management/services/contentservice/) and the [Media Service](../../../../reference/management/services/mediaservice.md). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.IO @using Umbraco.Cms.Core.Serialization diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md index 6c23908dc3d..a5cf504c719 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md @@ -47,6 +47,10 @@ There is also a Value Type: Long string if you need to set a long string value f See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @{ @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md index b22e5d1d4a6..1900fc564d4 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md @@ -63,6 +63,10 @@ There are three settings available for manipulating the **Markdown editor** prop See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md index 592dcea8bf1..494fa66023a 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md @@ -143,6 +143,10 @@ See the example below to see how a value can be added or changed programmaticall The following sample will update a single image in a Media Picker. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md index 70604f5b98a..f6b33bc2b5d 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker.md @@ -82,6 +82,10 @@ When this setting is enabled, a user who doesn't normally have access to the med See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md index 9c81fdbadf6..8bf8da56332 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md @@ -39,6 +39,10 @@ The Member Group Picker opens a panel to pick one or more member groups from the See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md index 240c574f708..574bf12afe4 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md @@ -44,6 +44,10 @@ The member picker opens a panel to pick a specific member from the member sectio See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md index b3935e090a9..74f110a6239 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md @@ -51,6 +51,10 @@ If `Max number of items` is configured to `1` See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md index 8aee45e4597..c3adce112dd 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md @@ -52,6 +52,10 @@ The Repeatable textstrings property editor enables a content editor to make a li See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md index 54fa4fed276..6ad73a16475 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md @@ -72,6 +72,10 @@ You can also render the output by casting it to a string, which means you will n See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md index 4915a186bac..1b2de9b07f0 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md @@ -42,6 +42,10 @@ Pretty much like the name indicates this Data type enables editors to choose fro See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md index 19af569fa49..9d24b5b013a 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md @@ -69,6 +69,10 @@ Whenever a tag has been added it will be visible in the typeahead when you start You can use the ContentService to create and update Umbraco content from c# code, when setting tags there is an extension method (SetTagsValue) on IContentBase that helps you set the value for a Tags property. Remember to add the using statement for `Umbraco.Core.Models` to take advantage of it. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md index 885cd0cb4b5..4fbffd30d48 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md @@ -53,6 +53,10 @@ Textarea is an HTML textarea control for multiple lines of text. It can be confi See the example below to learn how a value can be added or changed programmatically to a Textarea property. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md index a568c5dd21f..e346497a651 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md @@ -55,6 +55,10 @@ Textbox is an HTML input control for text. It can be configured to have a fixed See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md index de6a2f239ba..10672412c65 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md @@ -44,6 +44,10 @@ It is also possible to define a label, that will be displayed next to the checkb See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md index f36247ca79e..3a854156332 100644 --- a/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md +++ b/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md @@ -60,6 +60,10 @@ Getting the Value of the property will return the user ID - properties of the Us See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](../../../../reference/management/services/contentservice/). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @{ diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md index b28473a76e5..1708bfc1f24 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md @@ -56,6 +56,10 @@ Unlike other property editors, the Prevalue IDs are not directly accessible in R See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Serialization diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md index 0d78f80f893..89a7f8babbd 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md @@ -55,6 +55,10 @@ It's possible to add a label to use with the color. See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ### Without labels ```csharp diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md index ee046d0b895..5c06f476f4e 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md @@ -38,6 +38,10 @@ The second setting is "Offset time". When enabling this setting the displayed ti See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md index 89a61a1de09..cd989355da7 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md @@ -36,6 +36,10 @@ If the value of **Step Size** is not set then all decimal values between 8 and 1 See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md index 89797cfc2de..45cf2411504 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md @@ -44,6 +44,10 @@ The document picker opens a panel to pick a specific page from the content struc See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md index 4bffcb17126..f80483bb0b1 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/email-address.md @@ -45,6 +45,10 @@ The Email Address Property Editor does not come with any further configuration. See the example below to learn how a value can be added or changed programmatically to an Email-address property. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md index b9903821f1c..606dec28c3d 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md @@ -44,6 +44,10 @@ The Eye Dropper Color picker allows you to choose a color from the full color sp See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md index 5393c07976a..3b7c029e681 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md @@ -62,6 +62,10 @@ Instead, we recommend using the [Media Picker](media-picker-3.md) for uploading See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html) and the [Media Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.MediaService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.IO @using Umbraco.Cms.Core.Serialization diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md index 85271b341c6..63a90b55171 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md @@ -47,6 +47,10 @@ There is also a Value Type: Long string if you need to set a long string value f See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @{ @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md index 7bb23385eed..feb56f44722 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md @@ -63,6 +63,10 @@ There are three settings available for manipulating the **Markdown editor** prop See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md index 7a8d9991b57..f73a6d69ca2 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md @@ -143,6 +143,10 @@ See the example below to see how a value can be added or changed programmaticall The following sample will update a single image in a Media Picker. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md index 6292bc4b375..8e14bd21148 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md @@ -39,6 +39,10 @@ The Member Group Picker opens a panel to pick one or more member groups from the See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md index f08afa26e82..ae95c53901c 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md @@ -44,6 +44,10 @@ The member picker opens a panel to pick a specific member from the member sectio See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md index 880d4e194a2..841c3bae461 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md @@ -51,6 +51,10 @@ If `Max number of items` is configured to `1` See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core; @using Umbraco.Cms.Core.Serialization diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md index 6c6c7239f0d..2492495a265 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md @@ -52,6 +52,10 @@ The Repeatable textstrings property editor enables a content editor to make a li See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md index b4e83ab924d..d80ea0ee63f 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md @@ -72,6 +72,10 @@ You can also render the output by casting it to a string, which means you will n See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md index e67f777499d..cacea7af1a5 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md @@ -42,6 +42,10 @@ Pretty much like the name indicates this Data type enables editors to choose fro See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md index 64a3bbf8b5f..4d9c1331412 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md @@ -59,6 +59,10 @@ There are two flavors of the slider. One with a single value picker. One with a See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ### With a range off ```csharp diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md index a07cde2339f..f10a9f9af3c 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md @@ -69,6 +69,10 @@ Whenever a tag has been added it will be visible in the typeahead when you start You can use the ContentService to create and update Umbraco content from c# code, when setting tags there is an extension method (SetTagsValue) on IContentBase that helps you set the value for a Tags property. Remember to add the using statement for `Umbraco.Core.Models` to take advantage of it. +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Serialization @using Umbraco.Cms.Core.Services diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md index 183e0c2395d..9fb0b648582 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md @@ -47,6 +47,10 @@ Textarea is an HTML textarea control for multiple lines of text. It can be confi See the example below to learn how a value can be added or changed programmatically to a Textarea property. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md index 4744e34407c..70bda732c33 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md @@ -55,6 +55,10 @@ Textbox is an HTML input control for text. It can be configured to have a fixed See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md index ac0d384c35a..75ef945630a 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md @@ -44,6 +44,10 @@ It is also possible to define a label, that will be displayed next to the checkb See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @using Umbraco.Cms.Core.Services; @inject IContentService Services; diff --git a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md index 15548c0667b..d65c83a3ad5 100644 --- a/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md +++ b/14/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md @@ -60,6 +60,10 @@ Getting the Value of the property will return the user ID - properties of the Us See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the [Content Service](https://apidocs.umbraco.com/v14/csharp/api/Umbraco.Cms.Core.Services.ContentService.html). +{% hint style="info" %} +The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments. +{% endhint %} + ```csharp @inject IContentService Services; @{