I realize that it might be a bug, but why can't you just drag and drop a block? :)
Yes, I could do. But it is easier and faster to create a block clicking directly the link, which only shows you the allowed types, than going to blocks panel > select block type > create block > drag and drop the created block...
Fair enough, you wouldn't know which blocks are available until you actually start drag blocks and notice they won't drop. I believe there are some other differences as well, if a block is created on a page it isn't a IContent, but if it is created in a blocks folder, it is IContent. Either that or it's when a page has a single block as a property, can't recall.
It is when the page have a block as a property that is the special case, i.e. "local" block.
Hey Joel,
What he is saying is that on non commerce pages you have the follwoign for contetn areas:
The "create a new block" text is not available if you are editing a page type that inherits from ProductContent. This means the content staff have to go create the block manually, then come back to the product page. They then need to find the newly created block and drag that on to the area. Although this is a workaround, adding this link will save them a lot of time. this seems like an omission from Episerver, that we are trying to work around. I will have a look and see if it is fixed in the new version.
Hi guys,
Obviously this is an old post but for anyone looking for a solution I wrote the following blog providing a solution to this:
Thanks
Thanks David, I'll give that a go. If it works my content team are going to love you. Makes you wonder why Episerver haven't doen it, if it is so simple.
It is not that simple if you think from a framework perspective. Commerce contents already have their own collection of assets. Implementing IResourcable will make it duplicated, and it's hard to handle assets in an easy to understand way.
Yes we thought about it, talked about it, but it's not that easy.
No I'm not saying that. If that works for you then it works for you. I'm just replying to your "Makes you wonder why Episerver haven't doen it, if it is so simple.". Everything might be simple if it is a "workaround" for one site. But if it is something at framework level which has to work for every site then it might not be that simple.
I actually suggested the approach (not trying to undermine David's blog post), if that matters: https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/2/quotcreate-new-blockquot-option-unavailable-in-content-area-for-commerce-items/
My comment stands: "However this is obviously a work around, so you will have to live with the drawback (if any) "
Hello,
I am using some content areas in commerce, but I only can drag and drop blocks on them. I am not able to see the "create a new block" link, like it appears in CMS.
My CMS versions are:
I tried using the following dojo template, and I was able to see the link, but when I clicked publish button, I got an error: "Unable to load /epiui/edit/cms/Stores/contentdata/ status: 500. Value cannot be null. Parameter name: parentContent.
define([
"dojo/_base/declare",
"epi-cms/contentediting/editors/ContentAreaEditor"
],
function( declare, _ContentAreaEditor) {
return declare('shop.editors.ContentAreaWithCreateLink', [_ContentAreaEditor], {
isCreateLinkVisible: function() {
return true;
}
});
});
I found that something similar was a bug in version 7, https://world.episerver.com/support/Bug-list/bug/110583, but it seems to be fixed.
Anyone can help me?
Thanks in advances,
Kind regards.