Interface CommandDeleteParams
Parameters used for the command delete
.
โคด๏ธ back to All Command Names
delete Command
This button let's a user really delete a content item (since 2sxc 8.9).
How to use
Here's a basic example showing a 2sxc-toolbar with a custom code:
@Edit.Toolbar(toolbar: new {
action = "delete",
entityId = tag.EntityId,
entityGuid = tag.EntityGuid,
entityTitle = tag.EntityTitle })
The previous example just renders a delete-button. Here's an example creating an entire toolbar, incl. the delete-button.
@Edit.Toolbar(Content, toolbar: new {
entityId = Content.EntityId,
entityGuid = Content.EntityGuid,
entityTitle = Content.EntityTitle })
Note that for the delete-button to appear, the following conditions must be met:
- It is not an module-assigned item (also knows as content-mode), because in this case the item is in use, and it cannot be quick-deleted anyhow
- It has an entityId - used to show to the user to help him be sure he's deleting the right item
- It has an entityTitle - also shown to the user to be sure he's deleting the right thing
- It has an entityGuid - used as the ID when deleting the data as an extra level of security.
Notes and Clarifications
requires id, title and guid. otherwise the button won't appear
History
- Introduced in 2sxc v08.09
- Simplified later on, so most params are included
Package: Api.Js.SxcJs
Properties
entityGuid
Guid of item to delete, usually detected from context.
delete Command
This button let's a user really delete a content item (since 2sxc 8.9).
How to use
Here's a basic example showing a 2sxc-toolbar with a custom code:
@Edit.Toolbar(toolbar: new {
action = "delete",
entityId = tag.EntityId,
entityGuid = tag.EntityGuid,
entityTitle = tag.EntityTitle })
The previous example just renders a delete-button. Here's an example creating an entire toolbar, incl. the delete-button.
@Edit.Toolbar(Content, toolbar: new {
entityId = Content.EntityId,
entityGuid = Content.EntityGuid,
entityTitle = Content.EntityTitle })
Note that for the delete-button to appear, the following conditions must be met:
- It is not an module-assigned item (also knows as content-mode), because in this case the item is in use, and it cannot be quick-deleted anyhow
- It has an entityId - used to show to the user to help him be sure he's deleting the right item
- It has an entityTitle - also shown to the user to be sure he's deleting the right thing
- It has an entityGuid - used as the ID when deleting the data as an extra level of security.
Notes and Clarifications
requires id, title and guid. otherwise the button won't appear
History
- Introduced in 2sxc v08.09
- Simplified later on, so most params are included
Declaration
entityGuid: string
Property Value
Type | Description |
---|---|
string |
entityId
ID of item to delete, usually detected from context.
delete Command
This button let's a user really delete a content item (since 2sxc 8.9).
How to use
Here's a basic example showing a 2sxc-toolbar with a custom code:
@Edit.Toolbar(toolbar: new {
action = "delete",
entityId = tag.EntityId,
entityGuid = tag.EntityGuid,
entityTitle = tag.EntityTitle })
The previous example just renders a delete-button. Here's an example creating an entire toolbar, incl. the delete-button.
@Edit.Toolbar(Content, toolbar: new {
entityId = Content.EntityId,
entityGuid = Content.EntityGuid,
entityTitle = Content.EntityTitle })
Note that for the delete-button to appear, the following conditions must be met:
- It is not an module-assigned item (also knows as content-mode), because in this case the item is in use, and it cannot be quick-deleted anyhow
- It has an entityId - used to show to the user to help him be sure he's deleting the right item
- It has an entityTitle - also shown to the user to be sure he's deleting the right thing
- It has an entityGuid - used as the ID when deleting the data as an extra level of security.
Notes and Clarifications
requires id, title and guid. otherwise the button won't appear
History
- Introduced in 2sxc v08.09
- Simplified later on, so most params are included
Declaration
entityId: number
Property Value
Type | Description |
---|---|
number |
entityTitle
Title of item to delete, usually detected from context. This is important to show the "Are you sure?" dialog.
delete Command
This button let's a user really delete a content item (since 2sxc 8.9).
How to use
Here's a basic example showing a 2sxc-toolbar with a custom code:
@Edit.Toolbar(toolbar: new {
action = "delete",
entityId = tag.EntityId,
entityGuid = tag.EntityGuid,
entityTitle = tag.EntityTitle })
The previous example just renders a delete-button. Here's an example creating an entire toolbar, incl. the delete-button.
@Edit.Toolbar(Content, toolbar: new {
entityId = Content.EntityId,
entityGuid = Content.EntityGuid,
entityTitle = Content.EntityTitle })
Note that for the delete-button to appear, the following conditions must be met:
- It is not an module-assigned item (also knows as content-mode), because in this case the item is in use, and it cannot be quick-deleted anyhow
- It has an entityId - used to show to the user to help him be sure he's deleting the right item
- It has an entityTitle - also shown to the user to be sure he's deleting the right thing
- It has an entityGuid - used as the ID when deleting the data as an extra level of security.
Notes and Clarifications
requires id, title and guid. otherwise the button won't appear
History
- Introduced in 2sxc v08.09
- Simplified later on, so most params are included
Declaration
entityTitle: string
Property Value
Type | Description |
---|---|
string |