Copied to clipboard

Flag this post as spam?

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


  • Patrik 37 posts 89 karma points
    Jan 13, 2014 @ 09:31
    Patrik
    0

    Why doesn't the standard fields show?

    Hi,

    I haven't had any problems like this before, so i'm a bit lost here.

    I'm working on a template, that has a document type associated to it with some custom fields like phoneNumber and zipCode.

    If i render the custom fileds in the template like:

    @Umbraco.Field("phoneNumber")

    it shows up just fine. But when i choose any of the standard fields like 
    @Umbraco.Field("pageName") it renders nothing. I've tried with all of the standard fields and none of them shows up.

    Just for testing i created a razor script that simply output the pageName like @Model.pageName and then inserted the razor macro in the template, and that worked.

    What am i doing wrong?

    Using 7.0.1, MVC mode

     

  • Bjørn Fridal 274 posts 784 karma points
    Jan 14, 2014 @ 12:17
    Bjørn Fridal
    0

    Hi Patrik,

    I had the same question. I got around it by using Model.Content.Name in my partial view. Hope it helps.

    Cheers
    Bjørn Fridal 

  • Claudio Ridolfi 11 posts 62 karma points
    Feb 19, 2014 @ 23:17
    Claudio Ridolfi
    0

    Had the same problem right now and I found a pretty simple solution, I use @CurrentPage.Name (I figured out this after a look at this http://our.umbraco.org/documentation/Cheatsheets/DynamicNodeRazor.pdf)

Please Sign in or register to post replies

Write your reply to:

Draft