HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Properties store and present data for content, such as catalog content and blocks.

## Using a block as a property in catalog content

Blocks in Optimizely Customized Commerce can be used in code as a property, which reuses a set of properties in multiple instances. This topic describes how to add and render an existing block as a property in an existing catalog content type.

Blocks can only be rendered in the context of other content, such as a catalog content. When a block is used as a property in a catalog content, it is stored, loaded and versioned with that content.

### Adding a block as a property

Here we assume existing catalog content "FabricProduct," to which you want to add an existing block type "FabricBlock". The block has a FabricName property of type String, and an Image property of type ContentReference. The product content, "FabricProduct," will have the block as a property, and we will update the corresponding view for the the product to display the block as a property.

**Example**: The Fabric block type.

See also [Using a block as a Property][https://docs.developers.optimizely.com/content-cloud/v12.0.0-content-cloud/docs/using-a-block-as-a-property](🔗) "Optimizely Content Management System Developer Guide").

## Generic PropertyList(PropertyList<T>)

**PropertyList **is a property that lets define an editable list of objects. The content model can implement a property of type IList<T>, where T is a class with property definitions.

### Example of PropertyList in catalog content

This example shows how to implement a list of customer contacts on a product. The list contains items with string and int properties. First, define the "CustomerContact" model class.

Next, register the property definition. It uses a property class that sets the generic type to **Customer Contact** item class.

Finally, add the list of customer contacts on the product.