From 5a2d0d3d61a19a299c4fca00cc47e0aca0854765 Mon Sep 17 00:00:00 2001 From: Esha Noronha Date: Tue, 12 Nov 2024 15:07:56 +0100 Subject: [PATCH 1/7] Added Note for obsolete methods --- .../includes/obsolete-warning-publishedsnapshot.md | 7 +++++++ .../includes/obsolete-warning-snapshot-publishedcache.md | 7 +++++++ .../.gitbook/includes/obsolete-warning-snapshot.md | 7 +++++++ .../property-editors/full-examples-value-converters.md | 4 ++++ .../property-editors/property-value-converters.md | 6 ++++++ .../built-in-umbraco-property-editors/checkbox-list.md | 2 ++ .../built-in-umbraco-property-editors/color-picker.md | 2 ++ .../built-in-umbraco-property-editors/content-picker.md | 2 ++ .../built-in-umbraco-property-editors/date-time.md | 2 ++ .../built-in-umbraco-property-editors/decimal.md | 2 ++ .../built-in-umbraco-property-editors/document-picker.md | 2 ++ .../built-in-umbraco-property-editors/dropdown/README.md | 2 ++ .../eye-dropper-color-picker.md | 2 ++ .../built-in-umbraco-property-editors/file-upload.md | 2 ++ .../built-in-umbraco-property-editors/label.md | 2 ++ .../built-in-umbraco-property-editors/markdown-editor.md | 2 ++ .../built-in-umbraco-property-editors/media-picker-3.md | 2 ++ .../member-group-picker.md | 2 ++ .../built-in-umbraco-property-editors/member-picker.md | 2 ++ .../built-in-umbraco-property-editors/multi-url-picker.md | 2 ++ .../built-in-umbraco-property-editors/multiple-textbox.md | 2 ++ .../built-in-umbraco-property-editors/numeric.md | 2 ++ .../built-in-umbraco-property-editors/radiobutton-list.md | 2 ++ .../built-in-umbraco-property-editors/slider.md | 2 ++ .../built-in-umbraco-property-editors/tags.md | 2 ++ .../built-in-umbraco-property-editors/textarea.md | 2 ++ .../built-in-umbraco-property-editors/textbox.md | 2 ++ .../built-in-umbraco-property-editors/true-false.md | 2 ++ .../built-in-umbraco-property-editors/user-picker.md | 2 ++ .../additional-preview-environments-support.md | 7 +++++-- .../custom-property-editors-support.md | 6 ++++++ .../reference/templating/modelsbuilder/introduction.md | 2 ++ .../templating/modelsbuilder/understand-and-extend.md | 2 ++ 15/umbraco-cms/reference/using-ioc.md | 2 ++ 15/umbraco-cms/reference/webhooks/README.md | 2 ++ .../reference/webhooks/expanding-webhook-events.md | 2 ++ 36 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 15/umbraco-cms/.gitbook/includes/obsolete-warning-publishedsnapshot.md create mode 100644 15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot-publishedcache.md create mode 100644 15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md diff --git a/15/umbraco-cms/.gitbook/includes/obsolete-warning-publishedsnapshot.md b/15/umbraco-cms/.gitbook/includes/obsolete-warning-publishedsnapshot.md new file mode 100644 index 00000000000..2597cee8417 --- /dev/null +++ b/15/umbraco-cms/.gitbook/includes/obsolete-warning-publishedsnapshot.md @@ -0,0 +1,7 @@ +--- +title: 'Obsolete Warning: PublishedSnapshot' +--- + +{% hint style="warning" %} +The following example uses `PublishedSnapshot`, which is obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. +{% endhint %} diff --git a/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot-publishedcache.md b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot-publishedcache.md new file mode 100644 index 00000000000..92b5a44abca --- /dev/null +++ b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot-publishedcache.md @@ -0,0 +1,7 @@ +--- +title: 'Obsolete Warning: Snapshot and Published Cache' +--- + +{% hint style="warning" %} +The following example uses `Umbraco.Cms.Core.PublishedCache` and `IPublishedSnapshotAccessor` which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. +{% endhint %} diff --git a/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md new file mode 100644 index 00000000000..2526b009abe --- /dev/null +++ b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md @@ -0,0 +1,7 @@ +--- +title: 'Obsolete Warning: Snapshot' +--- + +{% hint style="warning" %} +The following example uses `using Umbraco.Cms.Core.PublishedCache`, `IPublishedSnapshotAccessor`, and `PropertyCacheLevel.Snapshot`, which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. +{% endhint %} diff --git a/15/umbraco-cms/customizing/property-editors/full-examples-value-converters.md b/15/umbraco-cms/customizing/property-editors/full-examples-value-converters.md index 9a8b8ef0b5a..a094928f6a1 100644 --- a/15/umbraco-cms/customizing/property-editors/full-examples-value-converters.md +++ b/15/umbraco-cms/customizing/property-editors/full-examples-value-converters.md @@ -1,6 +1,9 @@ # Content Picker Value Converter Example +{% include "../../.gitbook/includes/obsolete-warning-snapshot-publishedcache.md" %} + {% code title="ContentPickerPropertyConverter.cs" %} + ```csharp using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models.PublishedContent; @@ -48,4 +51,5 @@ public class ContentPickerPropertyConverter : IPropertyValueConverter : null; } ``` + {% endcode %} diff --git a/15/umbraco-cms/customizing/property-editors/property-value-converters.md b/15/umbraco-cms/customizing/property-editors/property-value-converters.md index 2714b18cfe1..268afd7b7b0 100644 --- a/15/umbraco-cms/customizing/property-editors/property-value-converters.md +++ b/15/umbraco-cms/customizing/property-editors/property-value-converters.md @@ -113,6 +113,10 @@ This is particularly useful for property values that contain references to other #### `PropertyCacheLevel.Snapshot` +{% hint style="warning" %} +`PropertyCacheLevel.Snapshot` is obsolete in Umbraco 15 and will be removed in a future version. +{% endhint %} + The property value will only be cached for the duration of the current _snapshot_. A snapshot represents a point in time. For example, a snapshot is created for every content request from the frontend. When accessing a property in a snapshot using this cache level, it gets converted, cached throughout the snapshot, and later cleared. @@ -163,6 +167,8 @@ public object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPro This method converts the Intermediate to an Object. The returned value is used by the `GetPropertyValue` method of `IPublishedContent`. +{% include "../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + The below example converts the nodeId (converted to `Int` or `Udi` by _ConvertSourceToIntermediate_) into an 'IPublishedContent' object. ```csharp diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md index 3c08d525193..b22dce873dc 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md @@ -98,6 +98,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @using Umbraco.Cms.Core.PublishedCache; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md index d5dc48f3f31..ab7d3952362 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/color-picker.md @@ -118,6 +118,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @using Umbraco.Cms.Core.PublishedCache; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md index 7b7e69aba87..d3391fcbcdd 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/content-picker.md @@ -248,6 +248,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @using Umbraco.Cms.Core.PublishedCache; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md index 5c06f476f4e..5b8c9f1301a 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date-time.md @@ -74,6 +74,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md index cd989355da7..6ec67bf3ebb 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/decimal.md @@ -72,6 +72,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @using Umbraco.Cms.Core.PublishedCache; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md index 3d22a0a9012..bed60ca14e6 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/document-picker.md @@ -95,6 +95,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @using Umbraco.Cms.Core; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/dropdown/README.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/dropdown/README.md index 7b3bfe491a1..55fa03d5bf7 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/dropdown/README.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/dropdown/README.md @@ -125,6 +125,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md index 606dec28c3d..00ae579f0bf 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/eye-dropper-color-picker.md @@ -80,6 +80,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md index 3b7c029e681..96415ee9a25 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/file-upload.md @@ -130,6 +130,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @{ diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md index 63a90b55171..90ee3d8fdf3 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/label.md @@ -83,6 +83,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @{ @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md index feb56f44722..e49dfc853cf 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/markdown-editor.md @@ -102,6 +102,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md index 90ec71a90b1..5e3675c09e8 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3.md @@ -186,6 +186,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md index 8e14bd21148..b252f9bb935 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-group-picker.md @@ -85,6 +85,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @using Umbraco.Cms.Core; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md index ae95c53901c..2eb571dc669 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/member-picker.md @@ -84,6 +84,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @using Umbraco.Cms.Core; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md index 841c3bae461..8468cabf62d 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multi-url-picker.md @@ -138,6 +138,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md index 2492495a265..132ea2f62d0 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/multiple-textbox.md @@ -92,6 +92,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md index d80ea0ee63f..3858dcd6c72 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/numeric.md @@ -109,6 +109,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md index 48676fc9f0c..b0045009a36 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/radiobutton-list.md @@ -82,6 +82,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md index 4d9c1331412..067248ad598 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/slider.md @@ -123,6 +123,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md index f10a9f9af3c..91552446ece 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/tags.md @@ -107,6 +107,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled, you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md index 9fb0b648582..483caf338e3 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textarea.md @@ -83,6 +83,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md index 70bda732c33..74c0bb5a3da 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/textbox.md @@ -91,6 +91,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md index 75ef945630a..7aaf5288eab 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/true-false.md @@ -80,6 +80,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @using Umbraco.Cms.Core.PublishedCache; @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; diff --git a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md index d65c83a3ad5..0d584fe9c79 100644 --- a/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md +++ b/15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/user-picker.md @@ -95,6 +95,8 @@ Although the use of a GUID is preferable, you can also use the numeric ID to get If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: +{% include "../../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp @inject IPublishedSnapshotAccessor _publishedSnapshotAccessor; @{ diff --git a/15/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support.md b/15/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support.md index d4ab2385c8d..e381ee1933d 100644 --- a/15/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support.md +++ b/15/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support.md @@ -15,18 +15,20 @@ To get familiar with the preview functionality in the Delivery API, please refer The support for configuring additional preview environments in the Delivery API was introduced in version 12.3. {% endhint %} - ## Configuring custom preview URLs If your client libraries feature preview functionality, you can enable editors in Umbraco to navigate directly to their preferred preview environments. To achieve this, start by generating the necessary URLs for each environment you wish to allow for preview. These URLs need to trigger preview mode within your application, which will fetch and present draft content from the Delivery API. -Once you have these preview URLs, you will need to register them through code in Umbraco. +Once you have these preview URLs, you will need to register them through code in Umbraco. Additionally, there are plans to simplify this process further. In an upcoming major version of Umbraco, a UI will be introduced, allowing you to configure these custom preview URLs directly from the backoffice. +{% include "../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + Here is an example of how to register such preview URLs for both variant and invariant content using a notification handler: {% code title="AdditionalPreviewUrlsNotificationHandler.cs" %} + ```csharp using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Models.ContentEditing; @@ -75,6 +77,7 @@ public class AdditionalPreviewUrlsNotificationHandler : INotificationHandler diff --git a/15/umbraco-cms/reference/templating/modelsbuilder/understand-and-extend.md b/15/umbraco-cms/reference/templating/modelsbuilder/understand-and-extend.md index a4aa0928e1d..a968418d316 100644 --- a/15/umbraco-cms/reference/templating/modelsbuilder/understand-and-extend.md +++ b/15/umbraco-cms/reference/templating/modelsbuilder/understand-and-extend.md @@ -7,6 +7,8 @@ description: "Understand and extend modelsbuilder" Models are generated as partial classes. In its most basic form, a model for content type `TextPage` ends up in a `TextPage.generated.cs` file and looks like: +{% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp /// TextPage [PublishedModel("textPage")] diff --git a/15/umbraco-cms/reference/using-ioc.md b/15/umbraco-cms/reference/using-ioc.md index dc7309f89b3..ed0ad7594e4 100644 --- a/15/umbraco-cms/reference/using-ioc.md +++ b/15/umbraco-cms/reference/using-ioc.md @@ -365,6 +365,8 @@ Using the UmbracoHelper is only possible when there is an instance of the Umbrac [Read more about the ExamineManager in the Searching articles](searching/examine/). +{% include "../../.gitbook/includes/obsolete-warning-publishedsnapshot.md" %} + {% code title="SearchService.cs" %} ```csharp diff --git a/15/umbraco-cms/reference/webhooks/README.md b/15/umbraco-cms/reference/webhooks/README.md index a8e322961c7..0050da4269f 100644 --- a/15/umbraco-cms/reference/webhooks/README.md +++ b/15/umbraco-cms/reference/webhooks/README.md @@ -134,6 +134,8 @@ builder.WebhookEvents().Clear().AddCms(false); Sometimes it is desirable to modify one of the standard Umbraco webhooks, for example, to change the Payload. This can be done by adding a custom implementation, as shown in the code example below: +{% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp [WebhookEvent("Content Published", Constants.WebhookEvents.Types.Content)] public class MyCustomContentPublishedWebhookEvent : WebhookEventContentBase diff --git a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md index e63b2886841..16f4b03083d 100644 --- a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md +++ b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md @@ -140,6 +140,8 @@ To leverage the `WebhookEventContentBase` class, follow If we take a look at the `ContentPublishedWebhookEvent`, we can see how these methods are overriden. + {% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} + ```csharp protected override IEnumerable GetEntitiesFromNotification(ContentPublishedNotification notification) => notification.PublishedEntities; From ccdb0e796041a3be76ce937669f0d4abe4a8492b Mon Sep 17 00:00:00 2001 From: Esha Noronha Date: Tue, 12 Nov 2024 15:08:17 +0100 Subject: [PATCH 2/7] added note --- .../includes/obsolete-warning-ipublishedsnapshotaccessor.md | 2 +- 15/umbraco-cms/fundamentals/backoffice/settings-dashboards.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/15/umbraco-cms/.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md b/15/umbraco-cms/.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md index 406531a4668..8c5aab07201 100644 --- a/15/umbraco-cms/.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md +++ b/15/umbraco-cms/.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md @@ -3,5 +3,5 @@ title: 'Obsolete Warning: IPublishedSnapshotAccessor' --- {% hint style="warning" %} -The following example uses `IPublishedSnapshotAccessor`, which is obsolete in Umbraco 15 and will be removed in a future version. For more information, see the[ Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. +The following example uses `IPublishedSnapshotAccessor`, which is obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. {% endhint %} diff --git a/15/umbraco-cms/fundamentals/backoffice/settings-dashboards.md b/15/umbraco-cms/fundamentals/backoffice/settings-dashboards.md index 65f462d63c2..b846cd8d54d 100644 --- a/15/umbraco-cms/fundamentals/backoffice/settings-dashboards.md +++ b/15/umbraco-cms/fundamentals/backoffice/settings-dashboards.md @@ -39,7 +39,7 @@ The Published Status dashboard displays the status of your site in the Published * Internals - Lets you trigger a NuCache snapshots collection. {% hint style="info"%} -As of Umbraco 15 `IPublishedSnapshot`, `IPublishedSnapshotAccessor` & `SnapshotCache` are all obsolete. +As of Umbraco 15 `IPublishedSnapshot`, `IPublishedSnapshotAccessor`, and `SnapshotCache` are all obsolete. {%endhint%} From d95a5f5e5f09cc3f46f5ab85af25841af1144106 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:26:38 +0100 Subject: [PATCH 3/7] Update 15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md Co-authored-by: sofietoft --- 15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md index 2526b009abe..0262b908421 100644 --- a/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md +++ b/15/umbraco-cms/.gitbook/includes/obsolete-warning-snapshot.md @@ -3,5 +3,5 @@ title: 'Obsolete Warning: Snapshot' --- {% hint style="warning" %} -The following example uses `using Umbraco.Cms.Core.PublishedCache`, `IPublishedSnapshotAccessor`, and `PropertyCacheLevel.Snapshot`, which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. +The following example uses `Umbraco.Cms.Core.PublishedCache`, `IPublishedSnapshotAccessor`, and `PropertyCacheLevel.Snapshot`, which are obsolete in Umbraco 15 and will be removed in a future version. For more information, see the [Version specific upgrades](../../fundamentals/setup/upgrading/version-specific/#umbraco-15) article. {% endhint %} From ef3f40b9fe79aa0ae0e8164852d7379a34227e67 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:26:49 +0100 Subject: [PATCH 4/7] Update 15/umbraco-cms/reference/webhooks/expanding-webhook-events.md Co-authored-by: sofietoft --- 15/umbraco-cms/reference/webhooks/expanding-webhook-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md index 16f4b03083d..044b45daee9 100644 --- a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md +++ b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md @@ -140,7 +140,7 @@ To leverage the `WebhookEventContentBase` class, follow If we take a look at the `ContentPublishedWebhookEvent`, we can see how these methods are overriden. - {% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} +{% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} ```csharp protected override IEnumerable GetEntitiesFromNotification(ContentPublishedNotification notification) => notification.PublishedEntities; From 3985f5b5152c8639b6c08ab5fd4482cfc76a13b5 Mon Sep 17 00:00:00 2001 From: Esha Noronha Date: Wed, 13 Nov 2024 10:57:06 +0100 Subject: [PATCH 5/7] Added entry for Sections article in summary file --- 15/umbraco-cms/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/15/umbraco-cms/SUMMARY.md b/15/umbraco-cms/SUMMARY.md index 042e89f3e0b..40aea532397 100644 --- a/15/umbraco-cms/SUMMARY.md +++ b/15/umbraco-cms/SUMMARY.md @@ -41,6 +41,7 @@ * [Advanced Techniques With Flexible Load Balancing](fundamentals/setup/server-setup/load-balancing/flexible-advanced.md) * [Logging With Load Balancing](fundamentals/setup/server-setup/load-balancing/logging.md) * [Backoffice](fundamentals/backoffice/README.md) + * [Sections](fundamentals/backoffice/sections.md) * [Property Editors](fundamentals/backoffice/property-editors/README.md) * [Built-in Property Editors](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/README.md) * [Checkbox List](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/checkbox-list.md) From 7f7fc99810f187fbe8b9640c49c2c168504c4fdd Mon Sep 17 00:00:00 2001 From: Esha Noronha Date: Wed, 13 Nov 2024 11:09:54 +0100 Subject: [PATCH 6/7] Changed path --- 15/umbraco-cms/reference/using-ioc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-cms/reference/using-ioc.md b/15/umbraco-cms/reference/using-ioc.md index ed0ad7594e4..c7b08b48384 100644 --- a/15/umbraco-cms/reference/using-ioc.md +++ b/15/umbraco-cms/reference/using-ioc.md @@ -365,7 +365,7 @@ Using the UmbracoHelper is only possible when there is an instance of the Umbrac [Read more about the ExamineManager in the Searching articles](searching/examine/). -{% include "../../.gitbook/includes/obsolete-warning-publishedsnapshot.md" %} +{% include "../.gitbook/includes/obsolete-warning-publishedsnapshot.md" %} {% code title="SearchService.cs" %} From 440f492595f1e05103190dce5feaca7c1f8b1178 Mon Sep 17 00:00:00 2001 From: Esha Noronha Date: Wed, 13 Nov 2024 11:29:06 +0100 Subject: [PATCH 7/7] Fixed path of Note --- 15/umbraco-cms/reference/webhooks/README.md | 2 +- 15/umbraco-cms/reference/webhooks/expanding-webhook-events.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/15/umbraco-cms/reference/webhooks/README.md b/15/umbraco-cms/reference/webhooks/README.md index 0050da4269f..45cd8591d58 100644 --- a/15/umbraco-cms/reference/webhooks/README.md +++ b/15/umbraco-cms/reference/webhooks/README.md @@ -134,7 +134,7 @@ builder.WebhookEvents().Clear().AddCms(false); Sometimes it is desirable to modify one of the standard Umbraco webhooks, for example, to change the Payload. This can be done by adding a custom implementation, as shown in the code example below: -{% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} +{% include "../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} ```csharp [WebhookEvent("Content Published", Constants.WebhookEvents.Types.Content)] diff --git a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md index 044b45daee9..9292a82db81 100644 --- a/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md +++ b/15/umbraco-cms/reference/webhooks/expanding-webhook-events.md @@ -140,7 +140,7 @@ To leverage the `WebhookEventContentBase` class, follow If we take a look at the `ContentPublishedWebhookEvent`, we can see how these methods are overriden. -{% include "../../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} +{% include "../../.gitbook/includes/obsolete-warning-ipublishedsnapshotaccessor.md" %} ```csharp protected override IEnumerable GetEntitiesFromNotification(ContentPublishedNotification notification) => notification.PublishedEntities;