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:
loudej
2009-11-23 22:32:43 +00:00
parent 7c9dbd081d
commit 37b270dcab
14 changed files with 198 additions and 137 deletions

View File

@@ -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 });
}

View File

@@ -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