Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
My master template is called master.cshtml. Inside it, I have the typical header, body, etc layout.
Inside the body, I want to call a partialView to add some header content in a more refactored way (not everything on master.cshtml)
Master.cshtml
@inherits Umbraco.Web.Mvc.UmbracoViewPage @using Umbraco.Web; ... @Html.Partial("MasterLayout/Header/_OpenGraph"); ...
I don't know what to put in the _OpenGraph partial as model...
_OpenGraph.cshtml
@model XXXX
I am using modelsBuilder.
Hi Nicolas,
Just remove this line -
Use this first line for all partial views -
@inherits UmbracoViewPage
Thanks,
Alex
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Use a partial view inside master template
My master template is called master.cshtml. Inside it, I have the typical header, body, etc layout.
Inside the body, I want to call a partialView to add some header content in a more refactored way (not everything on master.cshtml)
Master.cshtml
I don't know what to put in the _OpenGraph partial as model...
_OpenGraph.cshtml
I am using modelsBuilder.
Hi Nicolas,
Just remove this line -
Use this first line for all partial views -
Thanks,
Alex
is working on a reply...