Try our conversational search powered by Generative AI!

Disable "create new block" for content area

Vote:
 

We have a content area in a commerce solution which is restricted to NodeContent (i.e. categories) with the intention that the editor can drag/drop categories from the catalog tree. It doesn't make sense to have the "create new block" link in that content area.

Is there any way we can disable "create new block" for a content area?

#90486
Sep 10, 2014 14:49
Vote:
 

Linus Ekström writes in a comment to his own post here how to do it.

Just put this in the language file to override the default text:
<episerver>
<cms>
<widget>
<overlay>
<blockarea>
<emptyactions>
<template>You can drop content here</template>
</emptyactions>
</blockarea>
</overlay>
</widget>
</cms>
</episerver>

#109815
Oct 15, 2014 13:58
Vote:
 

Thanks. However this will disable it for all content areas. I would like to be able to disable it per content area. Preferrably through an attribute on the declaration, along the lines of AllowedTypes...

Something like

[CultureSpecific]
[AllowedTypes(typeof(BannerBlock))]
[AddNewEnabled(false)]
public virtual ContentArea RollingBannerArea { get; set; }
#109820
Oct 15, 2014 14:37
Vote:
 

+1! count my voice too

#114087
Dec 04, 2014 10:40
Vote:
 

Hi!

We are currently working on fixing the known issues for the AllowedTypes pattern and will try to include this functionality as the same time. So if you are lucky you get a nice christmas present :).

#114090
Dec 04, 2014 11:07
Vote:
 

Hi,

Did the ability to disable the "Create new" and only allow drag and drop of existing blocks get added as suggested above?  I have exactly the same requirement here.

Thanks

Gary

#148088
May 03, 2016 15:51
Vote:
 

Hi Gary,

I don't think that it's a built in functionality in EPi9, but tt's not difficult to implement.

Here is a detailed description:

https://gregwiechec.com/2016/05/how-to-disable-creating-new-blocks-in-content-area/

#148608
May 18, 2016 10:22
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.