Copied to clipboard

Flag this post as spam?

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


  • Niker 21 posts 91 karma points
    Jun 05, 2019 @ 11:11
    Niker
    0

    Umbraco field in masterpage

    I want to add a field to the master page but does not show me this.

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.Master>
    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
    }
    @Umbraco.Field("temat")
    @RenderBody()
    
  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Jun 05, 2019 @ 13:02
    Alex Skrypnyk
    0

    Hi Niker

    You need to add a field to the page, master it's just a template, it can be used on any page.

    On which page did you add this field?

    Alex

  • Niker 21 posts 91 karma points
    Jun 05, 2019 @ 13:54
    Niker
    0

    On master. I want to insert a header and footer.

  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Jun 05, 2019 @ 20:37
    Alex Skrypnyk
    0

    Niker, and this is great, but, this helper:

    @Umbraco.Field("temat")
    

    Retrieves the content always from the node you are visiting.

    Can you show that you are on the page that has content in "temat" field?

  • Niker 21 posts 91 karma points
    Jun 06, 2019 @ 08:15
    Niker
    0

    I'm not. This field is in the master page and I am on the subpage and do not read this field from the master.

Please Sign in or register to post replies

Write your reply to:

Draft