-
How can I add action to Actions of the ContentItem and hide a certain action of the ContentItem,please? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You should be able to make a public class MyAdditionalActionButtonDriver : ContentDisplayDriver
{
public override IDisplayResult Display(ContentItem contentItem)
{
return Shape("MyAdditionalActionButton_SummaryAdmin__Button__Actions", new ContentItemViewModel(contentItem))
.Location("SummaryAdmin", "ActionsMenu:10");
}
} And then just add the driver to your I am not sure the best way to hide an action button. Maybe a placements file? |
Beta Was this translation helpful? Give feedback.
-
Hi @douwinga , These codes can run, but there is a question that my additional action present in ActionsMenu of any content type, I hope that my additional action only present in ActionsMenu of the specific content type, how shoud I do,please? |
Beta Was this translation helpful? Give feedback.
You should be able to use
RenderWhen
to handle showing a button only for a specific content type. Something like this