mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#5270: Fixed Shape type not found error.
This commit is contained in:
@@ -103,6 +103,9 @@ namespace Orchard.Layouts.Drivers {
|
||||
// Execute the query.
|
||||
var contentItems = _projectionManager.GetContentItems(query.Id, pager.GetStartIndex() + element.Skip, pager.PageSize).ToList();
|
||||
|
||||
context.ElementShape.ContentItems = contentItems;
|
||||
context.ElementShape.BuildShapes = (Func<string, IEnumerable<dynamic>>) (displayType => contentItems.Select(x => _contentManager.BuildDisplay(x, displayType)));
|
||||
|
||||
// TODO: Figure out if we need this for a Projection Element, and if so, how.
|
||||
//// Sanity check so that content items with ProjectionPart can't be added here, or it will result in an infinite loop.
|
||||
//contentItems = contentItems.Where(x => !x.Has<ProjectionPart>()).ToList();
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -616,6 +617,36 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\LayoutEditor.Template.Html.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Notifications.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Notifications.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Elements.Menu.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Menu.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Menu.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Breadcrumbs.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Breadcrumbs.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Elements.Breadcrumbs.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Styles\LayoutEditor\Menu.less" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Projection.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
var contentShapes = ((Func<string, IEnumerable<dynamic>>)Model.BuildShapes)("Summary").ToList();
|
||||
var list = New.List();
|
||||
list.AddRange(contentShapes);
|
||||
}
|
||||
@if (contentShapes.Any()) {
|
||||
@Display(list)
|
||||
}
|
||||
else {
|
||||
<p>@T("The query returned no results.")</p>
|
||||
}
|
||||
Reference in New Issue
Block a user