London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
If you make sure that the specific block is "Available in edit mode", does the "Create a new block" appear then?
Yes, the "Create a new block" option appear while the spesific block is 'availeble in edit mode'. But then the block is available for the editors to create it 'all over the place'
Is there another way to create a block within a content area and no where else?
CMS 11.14
I know this is an old post but I, too, have the same problem.
I have a main block that will be free to create for editors and the block has a ContentArea inside where there's only one block type is allowed, say block B. When I decorate block B as AvailableInEditMode=false, I cannot create the block B inside the ContentArea; the link 'create a new block' dissapears. See the following code for an example that's not working as intended.
public class A : BlockData
{
[AllowedTypes(typeof(B))]
[CultureSpecific]
public virtual ContentArea Items { get; set; }
}
[ContentType(AvailableInEditMode = false)]
public class B : BlockData
{
public virtual string Title { get; set; }
public virtual XhtmlString Text { get; set; }
}
I am trying to use blocks instead of Generic PropertyList because property lists are not recommended anymore, am I doing something wrong?
AvailableInEditMode is applied both when creating a block in the asset panel (among the folders) and when clicking create a new block.
I guess you can get a workaround making your own content type advisor https://talk.alfnilsson.se/2016/04/17/customize-suggested-pageblock-types-when-creating-content/
And see if you can identify that you're creating a block in a content asset folder
I want to have a contentarea which contains blocks of a spesific type. The blocks can only be created within the contentarea, they are not visible for the editors (AvailableInEditMode=false)
A ordinary contentarea has the functunality of 'You can drop content here, or Create a new block', but when i add the [AllowedTypes(typeof(SpesificBlock))] attribute to the contentarea 'Create a new block' dissapears.
What to do?
Is it a bug?