Copied to clipboard

Flag this post as spam?

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


  • vinit 10 posts 83 karma points
    Sep 29, 2023 @ 06:55
    vinit
    0

    Render a field of pages in partial view

    I have 2 pages in Umbraco 1 page is Practices which is a normal page it has many fiels in it like practicename practiceLname

    2 page is footer which is Partial page

    so now i need to display this practicename

    field value in Footer page which is Partial so how can io do that

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Sep 29, 2023 @ 14:45
    Huw Reddick
    0

    Your partial view should have access to the pages Model (if you have inherited UmbracoViewPage, so you should just be able to do

    @if (Model.HasValue("practicename"))
    {
        @Model.Value("practicename")
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft