#18189: Applying default Location when no placement is provided

Work Item: 18189

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-12-06 12:58:50 -08:00
parent 3f925b5386
commit 42e00e3bf7

View File

@@ -123,6 +123,9 @@ namespace Orchard.ContentManagement {
Path = VirtualPathUtility.AppendTrailingSlash(_virtualPathProvider.ToAppRelative(request.Path)) // get the current app-relative path, i.e. ~/my-blog/foo
};
// define which location should be used if none placement is hit
descriptor.DefaultPlacement = defaultLocation;
var placement = descriptor.Placement(placementContext);
if (placement != null) {
placement.Source = placementContext.Source;