3
我看到媒体库能够将形状附加到导航和操作。不过,我正在尝试解决如何将操作形状添加到操作中,以便可以将新按钮添加到媒体库以调用模块中的操作。将自定义操作添加到Orchard CMS媒体库
从媒体库AdminController.cs:
// let other modules enhance the ui by providing custom navigation and actions
var explorer = Services.ContentManager.New("MediaLibraryExplorer");
explorer.Weld(new MediaLibraryExplorerPart());
var explorerShape = Services.ContentManager.BuildDisplay(explorer);
var viewModel = new MediaManagerIndexViewModel {
CustomActionsShapes = explorerShape.Actions, // <-- I need to have my shape that is rendered as a button in here
};
还是有点绿色的果园,但感觉就像在我使用的形状,并把他们的理解孔。我不认为一个部分需要参与渲染按钮的形状,因为没有任何东西需要存储。