0
我爲this wonderful guide創建了Orchard自定義模塊。Orchard自定義模塊顯示空白「創建」頁面
我創建了一個名爲BarberAdminController控制器如下:
[Admin]
public class BarberAdminController : Controller
{
...
public BarberAdminController(IOrchardServices services, IRepository<BarberPart> repository)
{
_repository = repository;
_services = services;
}
...
public ActionResult Create()
{
var barber = _services.ContentManager.New(typeof(BarberPart).ToString());
dynamic model = _services.ContentManager.BuildEditor(barber);
return View(model);
}
}
查看:
@{ Layout.Title = T("New Barber").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
@Display(Model)
}
一旦點擊從管理菜單中的鏈接,創建一個理髮師,我得到什麼也沒有一個空白頁但一個「保存」按鈕。 (URL:/ Admin/BarberShop/Barbers/Create)
有誰知道我可能會做錯什麼?
我已經設置了路線和管理鏈接,他們似乎工作正常。我儘可能按照我的指導正確創建了BarberPart的驅動程序和處理程序。包括下載到Migration.cs文件數據庫模式。
任何幫助將是偉大的!
缺少位置可能? – 2012-03-31 07:23:05