Hi all. Im new in RazorLight, so don't throw tomatoes)
I have a several templates with pages in db. Each template consists of string Layout (cshtml with @RenderBody) and several pages (with ViewContent cshtml).
I want to collect Layout with needed page (ViewContent), but i don't know how. So, i want to inject ViewContent of the page to Layout (@RenderBody)
var layout = await engine.CompileRenderAsync(template.Layout, (dynamic?)null);
var viewContent = await engine.CompileRenderAsync(page.ViewContent, (dynamic?)null);
Hi all. Im new in RazorLight, so don't throw tomatoes) I have a several templates with pages in db. Each template consists of string Layout (cshtml with @RenderBody) and several pages (with ViewContent cshtml).
I want to collect Layout with needed page (ViewContent), but i don't know how. So, i want to inject ViewContent of the page to Layout (@RenderBody)
How can i to do this?