Try our conversational search powered by Generative AI!

Local blocks and Content Delivery API



I noticed that my properties that are local blocks are not visible in the JSON that I get in return from a reqeust to the Content Delivery API.

Is there any way to include properties from local blocks in a request to "/api/episerver/v2.0/content/{referenceORguid}"?

I've been looking at making my own PropertyModel but I'm not sure how I can get it to apply to a local block. Anyone have any ideas or input?


Mar 27, 2019 12:54

Hi Niklas,

You should create a new property model converter for your custom property.

Checkout this document for more details.

Mar 28, 2019 7:48

Hi Quan,

Thanks for your reply!

I've been looking at making my own property model but as I said, I'm not sure how I can get it to apply to a local block.

If I create a new class that inherits from PropertyModel<TValue,TType> , what should i put as TType? It must be a type that is a type of PropertyData, and what type of PropertyData is a local block?

Do you have any example of this? I can't get it to work.

Mar 29, 2019 9:14

Hi Niklas,

Can you show me the code of your custom property and its usage ?

Mar 29, 2019 11:12

Hi Quan,

I don't have any code to show you since I don't know what to put as TType for a local block.


Mar 29, 2019 11:14

Hi Niklas,

You can put PropertyBlock as TType.  

You can take a look at the music festival template site to see the real scenario on how to create custom block and implement property model.

  1. Create a custom block. here
  2. Create property model for custom block. here
  3. Create property model converter here
  4. Display its value on UI here 
Apr 01, 2019 3:58


Thanks for your reply! I will try this.

Apr 01, 2019 16:00

Hi Niklas,

If it works, please mark as Resolve :)

Apr 02, 2019 8:24
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.