Class BlockLayoutItemBase
Base class for block layout items.
Inheritance
Namespace: Umbraco.Cms.Core.Models.Blocks
Assembly: Umbraco.Core.dll
Syntax
public abstract class BlockLayoutItemBase : IBlockLayoutItem
Constructors
View SourceBlockLayoutItemBase()
Initializes a new instance of the BlockLayoutItemBase class.
Declaration
protected BlockLayoutItemBase()
BlockLayoutItemBase(Guid)
Initializes a new instance of the BlockLayoutItemBase class.
Declaration
protected BlockLayoutItemBase(Guid contentKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentKey | The content key. |
BlockLayoutItemBase(Guid, Guid)
Initializes a new instance of the BlockLayoutItemBase class.
Declaration
protected BlockLayoutItemBase(Guid contentKey, Guid settingsKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentKey | The content key. |
| Guid | settingsKey | The settings key. |
BlockLayoutItemBase(Udi)
Initializes a new instance of the BlockLayoutItemBase class.
Declaration
[Obsolete("Use constructor that accepts GUIDs instead. Scheduled for removal in Umbraco 18.")]
protected BlockLayoutItemBase(Udi contentUdi)
Parameters
| Type | Name | Description |
|---|---|---|
| Udi | contentUdi | The content UDI. |
BlockLayoutItemBase(Udi, Udi)
Initializes a new instance of the BlockLayoutItemBase class.
Declaration
[Obsolete("Use constructor that accepts GUIDs instead. Scheduled for removal in Umbraco 18.")]
protected BlockLayoutItemBase(Udi contentUdi, Udi settingsUdi)
Parameters
| Type | Name | Description |
|---|---|---|
| Udi | contentUdi | The content UDI. |
| Udi | settingsUdi | The settings UDI. |
Properties
View SourceContentKey
Gets or sets the content key.
Declaration
public Guid ContentKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | The content key. |
ContentUdi
Gets or sets the content UDI.
Declaration
[Obsolete("Use ContentKey instead. Scheduled for removal in Umbraco 18.")]
public Udi? ContentUdi { get; set; }
Property Value
| Type | Description |
|---|---|
| Udi | The content UDI. |
SettingsKey
Gets or sets the settings key.
Declaration
public Guid? SettingsKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? | The settings key. |
SettingsUdi
Gets or sets the settings UDI.
Declaration
[Obsolete("Use SettingsKey instead. Scheduled for removal in Umbraco 18.")]
public Udi? SettingsUdi { get; set; }
Property Value
| Type | Description |
|---|---|
| Udi | The settings UDI. |
Methods
View SourceReferencesContent(Guid)
Determines whether this layout item references the specified content key.
Declaration
public virtual bool ReferencesContent(Guid key)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The content key to check. |
Returns
| Type | Description |
|---|---|
| bool |
|
ReferencesSetting(Guid)
Determines whether this layout item references the specified settings key.
Declaration
public virtual bool ReferencesSetting(Guid key)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The settings key to check. |
Returns
| Type | Description |
|---|---|
| bool |
|