This project is read-only.

Group Query w/ Custom Shape

Topics: Customizing Orchard
Aug 24, 2015 at 10:30 PM
New to Orchard using 1.9

I am trying to display a grouped query using a custom shape.

I have a Content Type called StaffMember which has a couple fields, Name, Title, Email, Department..etc

Department is a Enumeration field which we are doing a grouped query on. I have set the Custom Shape to StaffMemberList.

I have then added a View in my theme called StaffMemberList.cshtml
@using Orchard.ContentManagement

    var staffList = ((IEnumerable<ContentItem>)Model.ContentItems).ToList();

@foreach (var staffMember in staffList)
  /*  if (staffMember.StaffMember != null)
    } */

This all works great, but I cannot seem to find the other fields. When I use Shape Tracing the Model doesn't have any of the fields.


Ideally I would love to just render the StaffMember shape as I styled that shape and then found out putting 6 projections (one for each department) was not going to fly.

Please let me know if you need to see any other code / details.

Thanks in advance!