Vulnerability in EPiServer.Forms
I'm having difficulties using my own ContentProvider and setting up the "For this page" folder in the assets pane in the editor view.
TL;DRUsing widget epi-cms.widget.HierarchicalList I can't see "For this page" folder in assets paneUsing widget epi-cms.component.SharedBlock I CAN see "For this page" folder in assets pane but my custom ContentProvider is not beeing used
I have a database full of workshop-entities that need to be editable via the EPi UI (create, edit, delete). Every workshop is assigned to a page in episerver. So I created a custom contentprovider to serve the workshops from the DB to Episerver.
I map my Workshop entities to WorkshopContent (that inherits from ContentBase, IContent) and everything is fine.
So far so good.
The problem I'm having is that I'm never able to access or see the "For this page" folder in the assets pane
In my ContentDescriptor I have tried setting all different kind of Roots but the only one that works is the Entry-point for the ContentProvider.I have understood leaving it (the overridden Roots property) blank (or returning empty array or array with empty ContentReference..) would render the "For this page" folder but alas.
This is all using my custom ComponentDefinition specifying widget type epi-cms.widget.HierarchicalList
When using the epi-cms.component.SharedBlocks widget-type I DO see the "For this page" folder but then my ContentProvider is not beeing used (its creating my WorkshopContent using the default content provider).
I have tried following the following guides
Would I need to create a custom DOJO-widget for this to succeed?
Whats up with the relationship between the properties ContentProviderElement.EntryPointString and the ContentRepositoryDescriptor.Roots?
Does anybody know about anyother documentation or guide out there?
Thanks in advance!
If I understand you correctly, you want to add local content to a page in the default content provider? To my knowledge, this is not possible, at least I do not know of a reasonable way to achieve this. A content provider basically adds a new hierarchy to the built in content tree. The entry point for the content provider is simply the parent node where the new sub tree should start.
Normally, the content inside the local folder is delivered by the same content provider that delivers the content.
Am I understanding your needs correctly?
Hi Linus, thank you for your answer!
Yes, you understand correctly. What I in a sence want to achieve is to use the default content provider for blocks and pages and a custom content provider for the new WorkshopContent but it should all be contained under the same root/hierarchy... So the custom contentprovider would need to have a reference to the current viewed page and store that on the custom content
Do you know if its possible to get the current viewed page's id in a DOJO-widget? In that case I would be able to create a "For this page" content folder under the new, custom, content providers root (entry-point)?