Class BlockGridLayoutItem
Used for deserializing the block grid layout.
Namespace: Umbraco.Cms.Core.Models.Blocks
Assembly: Umbraco.Core.dll
Syntax
public class BlockGridLayoutItem : BlockLayoutItemBase, IBlockLayoutItem
Constructors
View SourceBlockGridLayoutItem()
Initializes a new instance of the BlockGridLayoutItem class.
Declaration
public BlockGridLayoutItem()
BlockGridLayoutItem(Guid)
Initializes a new instance of the BlockGridLayoutItem class.
Declaration
public BlockGridLayoutItem(Guid contentKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentKey | The content key. |
BlockGridLayoutItem(Guid, Guid)
Initializes a new instance of the BlockGridLayoutItem class.
Declaration
public BlockGridLayoutItem(Guid contentKey, Guid settingsKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentKey | The content key. |
| Guid | settingsKey | The settings key. |
BlockGridLayoutItem(Udi)
Initializes a new instance of the BlockGridLayoutItem class.
Declaration
[Obsolete("Use constructor that accepts GUIDs instead. Scheduled for removal in Umbraco 18.")]
public BlockGridLayoutItem(Udi contentUdi)
Parameters
| Type | Name | Description |
|---|---|---|
| Udi | contentUdi | The content UDI. |
BlockGridLayoutItem(Udi, Udi)
Initializes a new instance of the BlockGridLayoutItem class.
Declaration
[Obsolete("Use constructor that accepts GUIDs instead. Scheduled for removal in Umbraco 18.")]
public BlockGridLayoutItem(Udi contentUdi, Udi settingsUdi)
Parameters
| Type | Name | Description |
|---|---|---|
| Udi | contentUdi | The content UDI. |
| Udi | settingsUdi | The settings UDI. |
Properties
View SourceAreas
Gets or sets the areas within this layout item.
Declaration
public BlockGridLayoutAreaItem[] Areas { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockGridLayoutAreaItem[] | The areas. |
ColumnSpan
Gets or sets the number of columns this item should span.
Declaration
public int? ColumnSpan { get; set; }
Property Value
| Type | Description |
|---|---|
| int? | The column span. |
RowSpan
Gets or sets the number of rows this item should span.
Declaration
public int? RowSpan { get; set; }
Property Value
| Type | Description |
|---|---|
| int? | The row span. |
Methods
View SourceReferencesContent(Guid)
Determines whether this layout item references the specified content key.
Declaration
public override 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 override bool ReferencesSetting(Guid key)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The settings key to check. |
Returns
| Type | Description |
|---|---|
| bool |
|