mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Working on providing support for some common aspects.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041960
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Orchard.Sandbox.Controllers
|
||||
public ActionResult Create(PageCreateViewModel model) {
|
||||
var page = _contentManager.Create<SandboxPage>("sandboxpage", item => {
|
||||
item.Record.Name = model.Name;
|
||||
item.As<CommonPart>().Container = CurrentSite.ContentItem;
|
||||
item.As<CommonAspect>().Container = CurrentSite.ContentItem;
|
||||
});
|
||||
return RedirectToAction("show", new { page.ContentItem.Id });
|
||||
}
|
||||
|
@@ -11,9 +11,9 @@ namespace Orchard.Sandbox.Models {
|
||||
|
||||
// define the "sandboxpage" content type
|
||||
Filters.Add(new ActivatingFilter<SandboxPage>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<CommonPart>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<RoutablePart>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<BodyPart>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<CommonAspect>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<RoutableAspect>("sandboxpage"));
|
||||
Filters.Add(new ActivatingFilter<BodyAspect>("sandboxpage"));
|
||||
Filters.Add(new StorageFilter<SandboxPageRecord>(pageRepository) { AutomaticallyCreateMissingRecord = true });
|
||||
|
||||
// add settings to site, and simple record-template gui
|
||||
|
Reference in New Issue
Block a user