mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 11:17:28 +08:00
Moving GroupId check up as updates are made too early
This commit is contained in:
@@ -30,6 +30,15 @@ namespace Orchard.ContentManagement.Drivers {
|
|||||||
if (string.IsNullOrEmpty(placement.Location) || placement.Location == "-")
|
if (string.IsNullOrEmpty(placement.Location) || placement.Location == "-")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// parse group placement
|
||||||
|
var group = placement.GetGroup();
|
||||||
|
if (!String.IsNullOrEmpty(group)) {
|
||||||
|
_groupId = group;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.Equals(context.GroupId ?? "", _groupId ?? "", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return;
|
||||||
|
|
||||||
dynamic parentShape = context.Shape;
|
dynamic parentShape = context.Shape;
|
||||||
context.ContentPart = ContentPart;
|
context.ContentPart = ContentPart;
|
||||||
|
|
||||||
@@ -62,15 +71,6 @@ namespace Orchard.ContentManagement.Drivers {
|
|||||||
newShapeMetadata.Wrappers.Clear();
|
newShapeMetadata.Wrappers.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse group placement
|
|
||||||
var group = placement.GetGroup();
|
|
||||||
if (!String.IsNullOrEmpty(group)) {
|
|
||||||
_groupId = group;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.Equals(context.GroupId ?? "", _groupId ?? "", StringComparison.OrdinalIgnoreCase))
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach (var alternate in placement.Alternates) {
|
foreach (var alternate in placement.Alternates) {
|
||||||
newShapeMetadata.Alternates.Add(alternate);
|
newShapeMetadata.Alternates.Add(alternate);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user