diff --git a/16/umbraco-engage/marketers-and-editors/introduction/README.md b/16/umbraco-engage/marketers-and-editors/introduction/README.md index 43e4bbca98b..5c98eefbc1d 100644 --- a/16/umbraco-engage/marketers-and-editors/introduction/README.md +++ b/16/umbraco-engage/marketers-and-editors/introduction/README.md @@ -24,7 +24,7 @@ Umbraco Engage uses a cookie to collect visitor data on your Umbraco website. Le ## [Profiling](../profiling/) -The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and anonymous visitors. +The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and unidentified visitors. ## [Settings](../settings/) diff --git a/16/umbraco-engage/marketers-and-editors/profiling/README.md b/16/umbraco-engage/marketers-and-editors/profiling/README.md index eaffd333434..ec367ce9e8a 100644 --- a/16/umbraco-engage/marketers-and-editors/profiling/README.md +++ b/16/umbraco-engage/marketers-and-editors/profiling/README.md @@ -1,7 +1,7 @@ --- description: >- Explore how the Profiles section helps track visitor sessions, manage - profiles, and differentiate between identified and anonymous visitors. + profiles, and differentiate between identified and unidentified visitors. --- # Profiling diff --git a/17/umbraco-cms/customizing/property-editors/full-examples-value-converters.md b/17/umbraco-cms/customizing/property-editors/full-examples-value-converters.md index 774c4371e7f..57a6577b502 100644 --- a/17/umbraco-cms/customizing/property-editors/full-examples-value-converters.md +++ b/17/umbraco-cms/customizing/property-editors/full-examples-value-converters.md @@ -1,6 +1,6 @@ # Property Value Converter full example -This page includes an example of a complete Property Value Converter. The example is that of a Property Value Converter for a Content Picker, where the user picks a node from the Umbraco tree. +This page includes an example of a complete Property Value Converter. The example is that of a Property Value Converter for a Content Picker, where the user picks a node from the Umbraco tree. {% code title="ContentPickerPropertyConverter.cs" %} diff --git a/17/umbraco-cms/customizing/property-editors/property-actions.md b/17/umbraco-cms/customizing/property-editors/property-actions.md index 710100d733e..42bccaabf6b 100644 --- a/17/umbraco-cms/customizing/property-editors/property-actions.md +++ b/17/umbraco-cms/customizing/property-editors/property-actions.md @@ -10,10 +10,7 @@ Property Actions appear as a small button next to the property label, which expa ## Property Actions in the UI -
- -

Property action in Block List

-
+![Property action in Block List](../../.gitbook/assets/property-actions-blocklist.png) ## Registering a Property Action @@ -22,9 +19,9 @@ Before creating a Property Action, make sure you are familiar with the [Extensio {% endhint %} Here is how you can register a new Property Action: -``` -import { extensionRegistry } from '@umbraco-cms/extension-registry'; -import { MyEntityAction } from './my-property-action.api'; + +```typescript +import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; const manifest = { type: 'propertyAction', @@ -40,14 +37,15 @@ const manifest = } }; -extensionRegistry.register(manifest); +umbExtensionsRegistry.register(manifest); ``` + ### Creating the Property Action Class Every Property Action needs a class that defines what happens when the action is executed. You can extend the `UmbPropertyActionBase` class for this. -``` +```typescript import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action'; import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property'; @@ -62,4 +60,4 @@ export class MyPropertyAction extends UmbPropertyActionBase { } } export { MyPropertyAction as api }; -``` \ No newline at end of file +``` diff --git a/17/umbraco-cms/customizing/property-editors/property-value-converters.md b/17/umbraco-cms/customizing/property-editors/property-value-converters.md index f64d7cb5cc3..befd80352eb 100644 --- a/17/umbraco-cms/customizing/property-editors/property-value-converters.md +++ b/17/umbraco-cms/customizing/property-editors/property-value-converters.md @@ -9,11 +9,13 @@ A Property Value Converter converts a property editor's database-stored value in For example, a Content Picker stores the Key of the picked node in the database. When reading published data, Umbraco returns an `IPublishedContent` object instead of the Key. This conversion is done by a Property Value Converter. A Property Value Converter has three conversion levels: + * **Source** - The raw data stored in the database; this is generally a `string`. * **Intermediate** - An object of a type that is appropriate to the property. For example, a node Key should be a `Guid`, or a collection of node Keys would be a `Guid[]`. * **Object** - The object to be used when accessing the property using the Published Content API. For example, the object returned by the `IPublishedContent.Value(alias)` method. Additionally, the Models Builder generates a property of the same type as the object. ## Create a Property Value Converter + A class becomes a Property Value Converter when it implements the `IPropertyValueConverter` interface from the `Umbraco.Cms.Core.PropertyEditors` namespace. Property Value Converters are automatically registered when implementing the interface. Any given PropertyEditor can only utilize a single Property Value Converter. ```csharp @@ -27,6 +29,7 @@ Consider using the `PropertyValueConverterBase` class as the base of your Proper The `IPropertyValueConverter` interface exposes the following methods you need to implement: ## Implement information methods + Implement the following methods, which provide Umbraco with context about the Property Value Converter. ### `IsConverter(IPublishedPropertyType propertyType)` @@ -44,6 +47,7 @@ public bool IsConverter(IPublishedPropertyType propertyType) ``` ### `IsValue(object value, PropertyValueLevel level)` + The `IsValue` method determines whether a property contains a meaningful value or should be considered "empty" at different stages of the value conversion process. This method is essential for Umbraco's `property.HasValue()` method. {% hint style="info" %} @@ -125,6 +129,7 @@ Here you specify which level the property value is cached at. A property value can be cached at the following levels: #### `PropertyCacheLevel.Element` + This is the most commonly used cache level and should be your default, unless you have specific reasons to do otherwise. The property value will be cached until its _element_ is modified. The element is what holds (or owns) the property. For example: @@ -158,11 +163,15 @@ public PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyT ``` ## Implement conversion methods + Implement the methods that perform the conversion from a raw database value to an intermediate value and then to the final type. Conversions happen in two steps. ### `ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)` + This method converts the raw data value into an appropriate intermediate type that is needed for the final conversion step to an object. + For example: + - A basic text property likely stores its data as a `string`, so that can be converted to a `string` intermediate value. - A Content Picker stores the node identifier (`Udi`) as a `string`. To return `IPublishedContent`, the final conversion step needs a `Udi` instead. So in the intermediate step, check if the `string` value is a valid `Udi` and convert the `string` to a `Udi` as the intermediate value. @@ -201,6 +210,7 @@ public object? ConvertIntermediateToObject(IPublishedElement owner, IPublishedPr ``` ## Override existing Property Value Converters + To override an existing Property Value Converter, either from Umbraco or a package, additional steps are required. Deregister the existing one to prevent conflicts. ```csharp diff --git a/17/umbraco-engage/marketers-and-editors/introduction/README.md b/17/umbraco-engage/marketers-and-editors/introduction/README.md index 43e4bbca98b..5c98eefbc1d 100644 --- a/17/umbraco-engage/marketers-and-editors/introduction/README.md +++ b/17/umbraco-engage/marketers-and-editors/introduction/README.md @@ -24,7 +24,7 @@ Umbraco Engage uses a cookie to collect visitor data on your Umbraco website. Le ## [Profiling](../profiling/) -The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and anonymous visitors. +The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and unidentified visitors. ## [Settings](../settings/) diff --git a/17/umbraco-engage/marketers-and-editors/profiling/README.md b/17/umbraco-engage/marketers-and-editors/profiling/README.md index dabfdacd83d..ec367ce9e8a 100644 --- a/17/umbraco-engage/marketers-and-editors/profiling/README.md +++ b/17/umbraco-engage/marketers-and-editors/profiling/README.md @@ -1,7 +1,7 @@ --- description: >- Explore how the Profiles section helps track visitor sessions, manage - profiles, and differentiate between identified and anonymous visitors. + profiles, and differentiate between identified and unidentified visitors. --- # Profiling @@ -20,9 +20,9 @@ The graph shows the number of new identified visitors over the last 30 days. The table displays an overview of the profiles per month. -## Identified versus Anonymous Profiles +## Identified versus Unidentified Profiles -As long as there is no data of a visitor, this profile is called "Anonymous". If a visitor [does not give consent](../../developers/introduction/the-umbraco-engage-cookie/module-permissions.md) to be identified, they remain "Anonymous". +As long as there is no data of a visitor, this profile is called "Unidentified". If a visitor [does not give consent](../../developers/introduction/the-umbraco-engage-cookie/module-permissions.md) to be identified, they remain "Unidentified". However, once a visitor logs in (via Umbraco's Members section) or submits an Umbraco Form, they become an "Identified Profile." For example: If you see a visitor name in the Profiles table it is because the visitor has logged in as a member.