Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Nicolas Erlijman 10 posts 79 karma points
    Apr 30, 2020 @ 21:51
    Nicolas Erlijman

    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)


    @inherits Umbraco.Web.Mvc.UmbracoViewPage
    @using Umbraco.Web;

    I don't know what to put in the _OpenGraph partial as model...


    @model XXXX

    I am using modelsBuilder.

  • Alex Skrypnyk 5772 posts 21984 karma points MVP 4x admin c-trib
    Apr 30, 2020 @ 21:52
    Alex Skrypnyk

    Hi Nicolas,

    Just remove this line -

    @model XXXX

    Use this first line for all partial views -

    @inherits UmbracoViewPage



Please Sign in or register to post replies

Write your reply to: