Hooking up create blog to the new templating model (currently broken).

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043560
This commit is contained in:
ErikPorter
2009-12-09 08:23:06 +00:00
parent 2639e38bae
commit 36c63bc4db
11 changed files with 54 additions and 39 deletions

View File

@@ -34,11 +34,12 @@ namespace Orchard.Core.Common.Providers {
_contentManager = contentManager;
T = NullLocalizer.Instance;
OnActivated<CommonAspect>(PropertySetHandlers);
OnCreating<CommonAspect>(DefaultTimestampsAndOwner);
OnLoaded<CommonAspect>(LazyLoadHandlers);
Filters.Add(new StorageFilter<CommonRecord>(repository));
OnActivated<CommonAspect>(PropertySetHandlers);
OnActivated<CommonAspect>(DefaultTimestampsAndOwner);
OnLoaded<CommonAspect>(LazyLoadHandlers);
//OnGetDisplayViewModel<CommonAspect>();
OnGetEditorViewModel<CommonAspect>(GetEditor);
OnUpdateEditorViewModel<CommonAspect>(UpdateEditor);
@@ -46,7 +47,7 @@ namespace Orchard.Core.Common.Providers {
public Localizer T { get; set; }
void DefaultTimestampsAndOwner(CreateContentContext context, CommonAspect instance) {
void DefaultTimestampsAndOwner(ActivatedContentContext context, CommonAspect instance) {
// assign default create/modified dates
if (instance.Record.CreatedUtc == null) {
instance.Record.CreatedUtc = _clock.UtcNow;