November Happy Hour will be moved to Thursday December 5th.

New Block Can't Add In Page

Vote:
 

Hello folks

I created a new Block programmatically with its controller and view. When I go into EPi Server Admin/Content Type I can see my new block.

When I'm trying to create a new page and insert the block, it doesnt appear in the list.

Any ideas?

Regards,

Martin Ouimet

#201934
Mar 07, 2019 15:37
Vote:
 

Hi Martin,

How does the ContentTypeAttribute for the block look in code? You should verify that AvailableInEditMode is not set to false.

Similarly, are you trying to create it in a specific ContentArea or just for the site in general? If it's for a ContentArea be aware that in code the ContentArea can be decorated with an AllowedTypesAttribute restricting which blocks it can contain.

#201936
Edited, Mar 07, 2019 16:12
Vote:
 

I found it. The Block needed to implement IHomeSectionPageBlock interface to appear in the list.

#201938
Mar 07, 2019 16:25
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.