如何在 Orchard CMS 中使用/添加现有媒体库小部件到自定义小部件中? [英] How to use/add existing Media Library widget into a custom widget in Orchard CMS?
问题描述
我正在编写一个自定义小部件,我想创建一个包含从现有媒体库中选择图像的图像选择器的表单.我注意到我可以使用现有的媒体库小部件,但我不知道如何将它包含在我的小部件中.我可以以某种方式从 EditPart 视图中导入它吗?
[更新]这是示例代码的一部分.假设您有这个 Edit Part 模板:
@using MediaLibrary.FilePicker//有没有办法添加它做这样的事情??@model Maps.Models.MapPart<字段集><legend>地图字段</legend><div class="editor-label">@Html.LabelFor(model => model.Latitude)
<div class="editor-field">@Html.TextBoxFor(model => model.Latitude)@Html.ValidationMessageFor(model => model.Latitude)
<div class="editor-label">@Html.LabelFor(model => model.Longitude)
<div class="editor-field">@Html.TextBoxFor(model => model.Longitude)@Html.ValidationMessageFor(model => model.Longitude)