This is what I want to achieve:
I have two custom Content Parts built QuestionRecord and ExpertRecord. The relation between these two parts are Experts answer to Questions posted by site users.
I have a global search module which is supposed to display a combined summary result of Questions and Expert Answers. But Expert part is somehow not picking up the Summary view, it is always showing the detail view.
<Place Parts_Expert_Summary="Content:2" />
<Place Parts_Expert="-" />
Driver Result methods in ExpertDriver:
protected override DriverResult Display(Expert part, string displayType, dynamic shapeHelper)
List<dynamic> questions = new List<dynamic>();
string partName = "Parts_Expert";
// only load questions when showing detail record.
questions = _questionService.GetQuestionsByExpert(part.ContentItem);
partName += "_Summary";
() => shapeHelper.Parts_Expert(ContentItem: part.ContentItem, Questions: questions));
<p>This is my Expert_Summary.cshtml file</p>
I want this View to be called on from the DriverResult method, but it is calling the detail view Experts.cshtml. Both views are placed in
I must be missing something but could not figure out what exactly it is.
I am still fairly new to Orchard so any suggestion would be a great help for me.