Replies: 3 comments 9 replies
-
That would be something like this (didn't test): @{
var shape = await ContentItemDisplayManager.BuildDisplayAsync(Content.ContentItemId[item.ContentItemId], "Summary");
@await DisplayAsync(shape)
} BTW to help figure out such things, I recommend you use the Orchard Core source, cloned to your device, as well as Lombiq OSOCE (and especially the Training Demo) as a living reference. These contain a huge number of examples of anything in OC. |
Beta Was this translation helpful? Give feedback.
-
All I want is to be able to render the content Items returned from a query with the template I specified, which I can easily do with Liquid with the code below. But how can I do with Razor?
|
Beta Was this translation helpful? Give feedback.
-
This is not the right method but I couldn't find any other solution :(
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How can I do the following Liquid logic in Razor?
Specifically:
{{ Content.ContentItemId[item.ContentItemId] | shape_build_display: "Summary" | shape_render }}
I’m unable to write this part in Razor. I’d appreciate your help.
Liquid Template Name : Widget__OurTeam
Template Content:
Beta Was this translation helpful? Give feedback.
All reactions