问题
I create 2sxc.org app for DNN and don't know how to allow a user to delete the content item?
Is there some toolbar snippet like:
@Edit.Toolbar(Content, actions: "edit,replace")
But also to create delete button?
If there is no such command, how can be manually created? Any guidance?
回答1:
The full list of actions is listed here
https://github.com/2sic/2sxc/blob/master/src/inpage/2sxc._actions.js
So just use
@Edit.Toolbar(Content, actions: "edit,replace,remove");
The reason is that delete is not implemented yet, as it has some complex & far reaching consequences. So the current button only removes it.
回答2:
Update: 2sxc 8.6 beta is out, and it supports adding custom buttons to the toolbar. Read about the API, JSON definitions in the wiki. I'll try to blog about specific step-by-step in a few weeks...
Note that delete has some complex issues explained here: https://github.com/2sic/2sxc/issues/618
来源:https://stackoverflow.com/questions/37285644/toolbar-item-for-delete-for-2sxc-module