Copied to clipboard

Flag this post as spam?

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


  • Leandro 1 post 71 karma points
    Oct 29, 2021 @ 21:00
    Leandro
    0

    Partial view with its own model and content

    Hey! I'm new to umbraco and struggling to understand how to achieve the following. I want to create a component (partial view) that that the user can change the content in the root of the content manage tab.

    I then want to render this partial in a bunch of different pages with their own model. How can I achieve this?

    I can create dynamic content and render partial view with the content stuck to that page, but can't manage to figure out how to have a shared components. Every time I try umbraco complains that partial and main view model don't match

  • Christian Tricarico 12 posts 92 karma points c-trib
    Nov 04, 2021 @ 14:28
    Christian Tricarico
    0

    You can still use strongly typed partial views. Have a look here: https://our.umbraco.com/documentation/reference/templating/mvc/partial-views#strongly-typed-partial-views

    In Umbraco 9 instead of

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<MyModel>
    

    you have

    @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<MyModel>
    
Please Sign in or register to post replies

Write your reply to:

Draft