Fix bug with location override

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-07-23 16:42:17 -07:00
parent 04607286e0
commit a59a712e98
2 changed files with 3 additions and 3 deletions

View File

@@ -19,14 +19,14 @@ namespace Orchard.Core.Common.Drivers {
}
protected override DriverResult Display(ContentPart part, TextField field, string displayType) {
var location = field.PartFieldDefinition.Settings.GetModel<LocationSettings>().Get(displayType, "primary", "5");
var location = field.GetLocation(displayType, "primary", "1");
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
.Location(location);
}
protected override DriverResult Editor(ContentPart part, TextField field) {
var location = field.PartFieldDefinition.Settings.GetModel<LocationSettings>().Get("Editor", "primary", "5");
var location = field.GetLocation("Editor", "primary", "1");
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
.Location(location);

View File

@@ -99,7 +99,7 @@ namespace Orchard.Core.ContentsLocation.Settings {
var viewModel = new LocationSettingsViewModel {
Definition = location,
Location = settings.Get(location.Name),
DefaultLocation = new ContentLocation { Zone = "body", Position = "" }
DefaultLocation = new ContentLocation { Zone = "primary", Position = "1" }
};
yield return DefinitionTemplate(viewModel, templateName: "LocationSettings", prefix: location.Name);
}